Undefined function 'plotconfusion' for input arguments of type 'categorical'. ? WHHAATT ????

5 views (last 30 days)
Pierre Lonfat
Pierre Lonfat on 2 May 2018
Answered: Steven Lord on 3 May 2018
Dear all,
I have no idea why the function plotconfusion does not work when the function confusionmat works perfectly well. Of couse with both the exact same inputs.
confusion = confusionmat(prediction(1:end-machine.fr-ceil(machine.ra_c/2)+2,1), machine.table.grade(machine.start+machine.fr+ceil(machine.ra_c/2)-2:end,1));
plotconfusion(prediction(1:end-machine.fr-ceil(machine.ra_c/2)+2,1), machine.table.grade(machine.start+machine.fr+ceil(machine.ra_c/2)-2:end,1));
Thank you very much for you help.
Pierre Lonfat
Pierre Lonfat on 3 May 2018
Thank you Geoff for your answer. I have Matlab R2017b on of the latest version I guess.
Secondly, I do not understand why a very similar function confusionmat works but not plotconfusion.
Should I download matlab again ?

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 3 May 2018
The online documentation is for the most recent release, which currently is release R2018a.
The ability to plot confusion labels for categorical labels using the plotconfusion function was introduced in release R2018a, according to the Release Notes.
I don't know exactly when the confusionmat function started supporting categorical arrays as inputs, but from reading the documentation it seems like that support started well before release R2017b.

Community Treasure Hunt

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

Start Hunting!

Translated by