Clear Filters
Clear Filters

Why is this inputting a confusion matrix?

3 views (last 30 days)
Jasmine Ershov
Jasmine Ershov on 12 Mar 2019
Edited: Jasmine Ershov on 4 Apr 2019
For some reason, MATLAB gives me this error when I try to use the xticklabels function:
Error using xticklabels(line 43)
Using xticklabels with ConfusionMatrixChart is not supported
Before, MATLAB gave me a colourful bar graph with xticklabels with more information than I put in. I removed some unnessecary information up above that made exactly the same bar graph but with drastically different variables, then the error message above was given to me. This did not happen in the Deep Learning Onramp. Here is my code:
% Resize image
img1 = imresize(img1, [227 227]);
% Classify image with my neural network
[testPreds, scores1] = classify(net, img1)
% Find the important scores
highscores1 = scores1 > 0.01;
% Get a list of my categories
categorynames = net.Layers(end).ClassNames;
% Create bar graph
xticklabels(categorynames(highscores1))
Please help!

Answers (0)

Categories

Find more on Labels and Annotations 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!