from:http://kubicode.me/2016/09/19/Machine%20Learning/AUC-Calculation-by-Python/ AUC介绍 AUC(Area Under Curve)是机器学习二分类模型中非常常用的评估指标,相比于F1-Score对项目的不平衡有更大的容忍性,目前常见的机器学习库中(比如scikit-learn)一般也都是集成该指标的计算,其计算原理可以参考这个ROC和AUC介绍以及如何计算AUC,但是有时候模型是单独的或者自己编写的,此时想要评
1.使用sklearn库和matplotlib.pyplot库 import sklearn import matplotlib.pyplot as plt 2.准备绘图函数的传入参数1.预测的概率值数组2.预测的labels值数组 for i in range(len(y_labeles)): a = np.argmax(y_labeles[i]) y_pred.append(y_conv.eval(feed_dict={x: np.reshape(mnist.test.images[i],
Draw_ROC_Curves This is a python file which is used for drawing ROC curves -f : assign file name -t : assign file type -r : when draw picture, it means the row number -c : when draw picture, it means the column number -i : the input file and the type