When plotting ROC curve; test_label​s=double(n​ominal(imd​sTest.Labe​ls)); I am getting an error as " Unrecognized function or variable 'nominal' .

1 visualizzazione (ultimi 30 giorni)
When plotting ROC curve;
test_labels=double(nominal(imdsTest.Labels));
I am getting an error as
" Unrecognized function or variable 'nominal' .
I am just wondering what I am missing here. Appriciate any help.

Risposta accettata

VBBV
VBBV il 26 Lug 2022
test_labels = nominal(imdsTest.Labels);
double(test_labels) % try this
If you have defined function named nominal in your program which returns double values its best to avoid using on function names and apply on return values, as above
  2 Commenti
Madhusudhan Rao
Madhusudhan Rao il 26 Lug 2022
Thanks for your reply. Still getting same error.
I haven't used the function 'nominal' in this Transfer Learning program. I used ResNet50 as a pretrained CNN. Should I import and install any module that may contain this function ?
% Confusion Matrix
figure;
plotconfusion(actual_labels,predicted_labels)
title('Confusion Matrix: ResNet50');
accuracy
%ROC Curve
test_labels = nominal(imds_Test.Labels );
double(test_labels)
[fp_rate,tp_rate,T,AUC]=perfcurve(test_labels,posterior(:,1),1);
figure; ....

Accedi per commentare.

Più risposte (0)

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by