In R2023a, one approach is to access the original confusion matrix info, and then create a new confusion chart with different labels. Using the fisheriris dataset, assume we created this confusion matrix in Classification Learner:
Next, export the confusion matrix out of Classification Learner using "Export Plot to Figure", and get access to the ConfusionMatrixChart object and the underlying data. Be sure to run "gca" right after the "Export Plot to Figure" operation, so that the ConfusionMatrixChart is the current figure.
ConfusionMatrixChart (Model 1 (Fine Tree)) with properties:
NormalizedValues: [3×3 double]
ClassLabels: {'setosa' 'versicolor' 'virginica'}
>> ConfusionMatrixCounts = ax.NormalizedValues;
>> OriginalClassLabels = ax.ClassLabels;
Define new class labels, and make a new confusionchart with the desired labels.
>> NewClassLabels = {'flower1' 'flower2' 'flower3'};
>> confusionchart(ConfusionMatrixCounts,NewClassLabels)