#valuesfor key, value in acc_dic.items():
print('for', key, ':', 'Accuracy of all folds is ', value)
for key, value in f1_dic.items():
print('for', key, ':', 'F1-score of all folds is ', value)
for key, value in auc_dic.items():
print('for', key, ':', 'AUC-ROC of all folds is ', value)
#meanfor key, value in acc_dic.items():
print('for', key, ':', 'mean of Accuracy of all folds is ', sum(value) / len(value))
for key, value in f1_dic.items():
print('for', key, ':', 'mean of F1-score of all folds is ', sum(value) / len(value))
for key, value in auc_dic.items():
print('for', key, ':', 'mean of AUC-ROC of all folds is ', sum(value) / len(value))
输出结果如下:
for NB : Accuracy of all folds is [0.88, 0.9, 0.94, 0.96, 0.96, 0.92, 0.95, 0.91, 0.91, 0.89]
for SVM : Accuracy of all folds is [0.89, 0.9, 0.95, 0.97, 0.96, 0.93, 0.95, 0.93, 0.93, 0.92]
for RFC : Accuracy of all folds is [0.92, 0.95, 0.93, 0.97, 0.98, 0.96, 0.97, 0.95, 0.94, 0.97]
for NB : F1-score of all folds is [0.8806854345165239, 0.9, 0.94, 0.96, 0.960016006402561, 0.92, 0.9500150015001501, 0.9103570338724444, 0.9100816614578082, 0.8890371743383791]
for SVM : F1-score of all folds is [0.8907272912216457, 0.8995376208490964, 0.9500150135121609, 0.9699788965933073, 0.96, 0.9300350035003501, 0.9500150015001501, 0.9302776930119012, 0.9300635144671843, 0.9191070690367922]
for RFC : F1-score of all folds is [0.9204569563443493, 0.9500985579416951, 0.9300210189170253, 0.9699788965933073, 0.98, 0.960032012805122, 0.97000900090009, 0.9500767263427109, 0.9401445202729828, 0.9699603295697284]
for NB : AUC-ROC of all folds is [0.8834229020256303, 0.8958333333333334, 0.9399038461538461, 0.9598554797270173, 0.9607371794871795, 0.9233239662786029, 0.9511217948717948, 0.9125615763546798, 0.9101010101010101, 0.8823051948051949]
for SVM : AUC-ROC of all folds is [0.8956180239768499, 0.8916666666666667, 0.9503205128205129, 0.9692894419911683, 0.9615384615384616, 0.9327579285427539, 0.9511217948717948, 0.933087027914614, 0.9303030303030303, 0.911525974025974]
for RFC : AUC-ROC of all folds is [0.9247622984704423, 0.95, 0.9302884615384616, 0.9692894419911683, 0.9799679487179487, 0.9622641509433962, 0.9711538461538461, 0.9503284072249589, 0.9434343434343434, 0.9683441558441558]
for NB : mean of Accuracy of all folds is0.922for SVM : mean of Accuracy of all folds is0.933for RFC : mean of Accuracy of all folds is0.9540000000000001for NB : mean of F1-score of all folds is0.9220192312087866for SVM : mean of F1-score of all folds is0.932975710369259for RFC : mean of F1-score of all folds is0.9540778019687011for NB : mean of AUC-ROC of all folds is0.9219166283138289for SVM : mean of AUC-ROC of all folds is0.9327228862651825for RFC : mean of AUC-ROC of all folds is0.9549833054318722