i got only four values classifying train and test images using fitctree and resubPredict function i have attached roc curve and following is the result having values like threshold accuracy FPR TPR, where am wrong i got only four values
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
   Thr      Accuracy    TPR      FPR   
    ___    ________    ___    ________
      1        95      0             0
      1    90.556      0      0.046784
    0.2    87.778      0      0.076023
      0         5      1             1
mdl = fitctree(P_train(:,1:20),train_label,'ClassNames',{'1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20'}); [predictlabel,score] = resubPredict(mdl); [FPR, TPR,Thr, AUC, OPTROCPT] = perfcurve(predictlabel(:,1), score(:,20),1)
 plot(TPR,FPR,'--rs','LineWidth',2,'MarkerEdgeColor','k','MarkerFaceColor','g','MarkerSize',10)
 xlabel('False positive rate')
 ylabel('True positive rate') 
 title('ROC Curve for Classification ')
 [~, Accuracy, Thr]  = perfcurve(predictlabel(:,1), score(:,20), 1,'yCrit','accu'); %
   figure,
    plot(Thr,Accuracy,'r-');
    hold on;
    plot(Thr,Accuracy,'bo');
    xlabel('Threshold value');
    ylabel('Classification Accuracy');
    grid on;
    disp('Recognition rate');
    [maxval, maxInd] = max(Accuracy)                  %display max index
    disp('threshold value');                                      %displays threshold value
    Accuracy = Accuracy*100;
    T = table(Thr,Accuracy,TPR,FPR)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Classification Trees에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
