标签:from 标准化 估计 orm int imp transform nsf 转换
class sklearn.preprocessing.Normalizer(norm=’l2’, copy=True)[source]from sklearn.preprocessing import Normalizer
X = [[4, 1, 2, 2],
[1, 3, 9, 3],
[5, 7, 5, 1]]
transformer = Normalizer().fit(X)
print transformer.transform(X)
print X
[[0.8 0.2 0.4 0.4]
[0.1 0.3 0.9 0.3]
[0.5 0.7 0.5 0.1]]
[[4, 1, 2, 2], [1, 3, 9, 3], [5, 7, 5, 1]]
标签:from 标准化 估计 orm int imp transform nsf 转换
原文地址:http://blog.51cto.com/13959448/2315933