sklearn

一、模块

模块preprocessing:几乎包含数据预处理的所有内容

模块Impute:填补缺失值专用

模块feature_selection:包含特征选择的各种方法的实践

模块decomposition:包含降维算法

 

验证算法:

sklearn.metrics print(classification_report(y_test, y_pred))
from sklearn.model_selection import cross_val_score
scores = cross_val_score(clf6, x_test, y_test, cv=5)
print("Accuracy: %0.2f (+/- %0.2f)" % (scores.mean(), scores.std() * 2))

处理标签
LabelBinarizer()  # 将标签转换为二值化标签
LabelEncoder()  # 将标签转换为唯一id标签
encoder = LabelEncoder() + fit_transform()

posted on 2019-12-30 14:05  nnnnnnnnnnnnnnnn  阅读(223)  评论(0)    收藏  举报

导航