Help on using perfcurve
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi everyone, does anyone know how to use the result from gmdistribution.fit and pdf to plot the ROC curve to test the performance of the GMM classifier? or is there any missing step in between? Thank you
댓글 수: 0
답변 (1개)
Ilya
2013년 11월 15일
Use the cluster method of the gmdistribution object to obtain cluster assignments and their posterior probabilities. Then pass these cluster indices to perfcurve as class labels and pass these posterior probabilities as classification scores. For example:
load fisheriris;
cv = cvpartition(species,'holdout',.5);
g = gmdistribution.fit(meas(cv.training,:),3);
[y,~,post] = cluster(g,meas(cv.test,:));
[fpr,tpr] = perfcurve(y,post(:,1),1,'negclass',[2 3]);
plot(fpr,tpr)
gives you a ROC curve of the 1st class vs 2nd and 3rd. (In this case there is perfect separation in the test data and you won't see a ROC curve, but that's the idea.)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!