필터 지우기
필터 지우기

How can I plot ROC and identify AUC value from SVM classification output ?

조회 수: 2 (최근 30일)
Pradya Panyainkaew
Pradya Panyainkaew 2018년 4월 11일
답변: Md Habib Ullah 2018년 8월 19일
Hi everyone
I try to classify binary classification problem from input data name "pred" and target data are "resp". These two files that attach below.In raw data, pred contain 96 features of 199 instances to be input data. Moreover, resp contain binary class (0 and 1) represent normal and abnormal power usage, respectively. The aim of this program are show ROC and calculate AUC of classification model by using SVM. I use some code like this
mdlSVM = fitcsvm(pred,resp,'Standardize',true);
mdlSVM = fitPosterior(mdlSVM);
[~,score_svm] = resubPredict(mdlSVM);
[Xsvm,Ysvm,Tsvm,AUCsvm] = perfcurve(resp,score_svm(:,mdlSVM.ClassNames),1);
plot(Xsvm,Ysvm)
However, The matlab software show this error "Subscript indices must either be real positive integers or logicals.". How can I fix it out to show ROC and AUC of this problem.
Thanks in advance

답변 (1개)

Md Habib Ullah
Md Habib Ullah 2018년 8월 19일
Make sure you "resp" is logical '1' or '0'.

카테고리

Help CenterFile Exchange에서 ROC - AUC에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by