classify関数によって得られた確率をROC曲線の出力をすることは可能でしょうか?
Show older comments
%% 微調整したネットワークを使用して検証イメージを分類
[YPred,probs] = classify(net,augimdsValidation);
% 正解率を表示
accuracy = mean(YPred == imdsValidation.Labels)
% 分類の混同行列を表示
C = confusionmat(imdsValidation.Labels,YPred)
confusionchart(C)
% ROC曲線の表示
[X,Y,T,AUC] = perfcurve(imdsTrain.Labels,probs,'anormaly')
AUC
plot(X,Y)
xlabel('False positive rate')
ylabel('True positive rate')
title('ROC for Classification')
画像の分類結果に関するROC曲線を出力したいのですが、classify関数を用いて画像の分類をし、そこで得られた確率(probs)を用いて、添付したコードの通り実行したところ、「スコアは浮動小数点のベクトルとして渡さなければなりません。」とエラーが出てきてしまいました。
2点質問があるのですが、
①classify関数によって得られた確率をROC曲線の出力をすることは可能でしょうか?
②①が可能である場合、どのように修正をすれば良いでしょうか?
よろしくお願いいたします。
Accepted Answer
More Answers (0)
Categories
Find more on Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!