def GetFeatures(frame):
#convert data to float
arr = np.array(frame,dtype=np.float)
#fill missing values
from sklearn.preprocessing import Imputer
imputer = Imputer(strategy='mean')
arr = imputer.fit_transform(arr)
#normalize the entire data
from sklearn.preprocessing import scale
arr = scale(arr)
return arr
#=================================================
irisclustering.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录