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
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Classification Trees dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!