解决bug之 使用AUC计算时,报错

unkown format is not supported

‘’’
y_test = np.array(y_test)
y_pre = np.array(y_pre)
precision, recall, _thresholds = metrics.precision_recall_curve(y_test,y_pre)
area = metrics.auc(recall, precision)
print(area)
‘’’

  • 注意:传进去的y_test和y_pre要在之前就保证是list类型!!!

你可能感兴趣的:(解决bug之 使用AUC计算时,报错)