python-自适应提升算法的多种对比方法及混淆矩阵的计算
1.KNN算法#coding:utf-8from sklearn.neighbors import KNeighborsClassifierimport numpy as npfrom sklearn.metrics import confusion_matrix # 导入计算混淆矩阵的包import pandas as pdX_train=pd.read_excel('D:\\xtrain.xlsx', header=None)Y_train=pd.read_excel('D:\\yt
原创
2020-12-28 20:06:54 ·
444 阅读 ·
0 评论