ROC曲线只有一点

问题描述

我有一个包含141个对象的训练集和一个包含15个对象的测试集。我训练了SVM分类器,并希望绘制ROC曲线以可视化性能。我使用的代码是:

training_fold = feature.selected.matrix[-x,] # training fold =  training set minus (-) it's sub test fold
test_fold = feature.selected.matrix[x,] # here we describe the test fold individually

classifier = svm(formula = Outcome ~ .,data = training_fold,type = 'C-classification',kernel = 'radial',gamma = 0.01,cost = 3,decision.value = TRUE)      
y_pred = predict(classifier,newdata = test_fold[,-ncol(test_fold)],decision.value = TRUE)


fitted = attributes(y_pred)$decision.values  

predob = prediction(fitted,test_fold$Outcome)


perf = performance(pred,'fpr','tpr')
perf
plot(perf)   #dev.off()

这给出了仅包含16个点的图,这使曲线不平滑。

enter image description here

此外,即使精度超过80%,AUC仍非常小(〜0.18)。有人可以帮我解释一下吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)