How to calculate AUC for One Class SVM in python?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have difficulty in plotting OneClassSVM's AUC plot in python (I am using sklearn which generates confusion matrix like [[tp, fp],[fn,tn]] with fn=tn=0 . from sklearn.metrics import roc_curve, auc fpr, tpr, thresholds = roc_curve(y_test, y_nb_predicted) roc_auc = auc(fpr, tpr) # this generates ValueError[1] print "Area under the ROC curve : %f" % roc_auc plt.plot(fpr, tpr, label='ROC curve (area = %0.2f)' % roc_auc) I want to handle error [1] and plot AUC for OneClassSVM . [1] ValueError: Input contains NaN, infinity or a value too large