原始问题:
ROC的python代码
import numpy as np
from sklearn import metrics
y = np.array([1, 1, 2, 2])
pred = np.array([0.1, 0.4, 0.35, 0.8])
fpr, tpr, thresholds = metrics.roc_curve(y, pred)
print('False Positive Rate:', fpr)
print('True Positive Rate:', tpr)
Prev:为双拼冰淇淋写条不少于100字评价