一.sklearn评估
1.混淆矩阵
from sklearn.metrics import confusion_matrix
confusion_matrix(testLabel,pre_label)
2.大小类评估指标:精确率,召回率,f1得分
from sklearn.metrics import classification_report
classification_report(testLabel, pre_label)
3.交叉验证
mode = GradientBoostingClassifier()
cross_val_score(mode, feaSet, inLabel, cv = 10, scoring = 'accuracy')
二.matplot 绘图
1.设置坐标轴标注
fig = plt.figure()
1.混淆矩阵
from sklearn.metrics import confusion_matrix
confusion_matrix(testLabel,pre_label)
2.大小类评估指标:精确率,召回率,f1得分
from sklearn.metrics import classification_report
classification_report(testLabel, pre_label)
3.交叉验证
mode = GradientBoostingClassifier()
cross_val_score(mode, feaSet, inLabel, cv = 10, scoring = 'accuracy')
二.matplot 绘图
1.设置坐标轴标注
fig = plt.figure()