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 view (last 30 days)
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.

Accepted Answer

VBBV
VBBV on 26 Jul 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 Comments
Madhusudhan Rao
Madhusudhan Rao on 26 Jul 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; ....

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!