mdlSVM = fitcsvm(pred,resp,'Standardize',true); mdlSVM = fitPosterior(mdlSVM); [~,score_svm] = resubPredict(mdlSVM); [Xsvm,Ysvm,Tsvm,AUCsvm] = perfcurve(resp,score_svm(:,mdlSVM.ClassNames),'true');
mdlSVM = fitcsvm(pred,resp,'Standardize',true,'Kfold',3);
此时 resubPredict 函数抛出一个错误,表示它不接受交叉验证的模型。
resubPredict
如何绘制交叉验证支持向量机分类器的ROC曲线?
kfoldPredict 工作做得很好。
kfoldPredict
https://nl.mathworks.com/help/stats/classificationpartitionedmodel.kfoldpredict.html