我如何显示ROC曲线以用于分类目的?我知道ROC曲线是基于输出是二进制的这一基本前提绘制的,但我听说有解决方法可以绕过这个警告.
到目前为止我的代码如下:
models = []
svc = LinearSVC(C=10, loss = 'hinge', random_state=1, max_iter=1000000)
models.append(('Linear SVC', svc))
models.append(('Kernel SVC', SVC(kernel = 'rbf', degree = 2, C=1.0, random_state=1, max_iter = 1000000)))
models.append(('AdaBoost', AdaBoostClassifier(DecisionTreeClassifier(max_depth=2),
n_estimators=200,
algorithm="SAMME.R",
learning_rate=0.5,
random_state=42)))
models.append(('RandomForest', RandomForestClassifier(max_depth=2,
n_estimators=500,
m
ax_leaf_nodes=16,
n_jobs=-1,
random_state=42)))