confusionchart maximization in subplots

조회 수: 2 (최근 30일)
Sharif Khalil
Sharif Khalil 2020년 6월 12일
편집: Sharif Khalil 2020년 6월 12일
I have 23 different machine learning algorithms extracted from the classification learner toolbox. I am trying to plot all the confusioncharts for all 23 in one plot using subplots, but I need to increase the size of the confusioncharts in each subplots so that I can see the numbers. Here is the for loop used to plot the confusioncharts, how can I make it bigger in each subplot so that I can see the numbers?
models = {'Fine Trees','Medium Trees','Coarse Trees',...
'Linear Discriminant','Gaussian Naive Bayes',...
'Kernel Naive Bayes','Linear SVM','Quadratic SVM',...
'Coarse SVM','Fine Gaussian SVM','Medium Gaussian SVM',...
'Coarse Gaussian SVM','Fine KNN','Medium KNN','Coarse KNN',...
'Cosine KNN','Cubic KNN','Weighted KNN','Boosted Trees',...
'Bagged Trees','Subspace Discriminant','Subspace KNN',...
'RUSBoosted Trees'};
y1 = FTrees.predictFcn(TestTable);
y2 = MTrees.predictFcn(TestTable);
y3 = CTrees.predictFcn(TestTable);
y4 = LD.predictFcn(TestTable);
y5 = GNB.predictFcn(TestTable);
y6 = KNB.predictFcn(TestTable);
y7 = LSVM.predictFcn(TestTable);
y8 = QSVM.predictFcn(TestTable);
y9 = CSVM.predictFcn(TestTable);
y10 = FGSVM.predictFcn(TestTable);
y11 = MGSVM.predictFcn(TestTable);
y12 = CGSVM.predictFcn(TestTable);
y13 = FKNN.predictFcn(TestTable);
y14 = MKNN.predictFcn(TestTable);
y15 = CrsKNN.predictFcn(TestTable);
y16 = CosKNN.predictFcn(TestTable);
y17 = CbcKNN.predictFcn(TestTable);
y18 = WKNN.predictFcn(TestTable);
y19 = BstTrees.predictFcn(TestTable);
y20 = BgdTrees.predictFcn(TestTable);
y21 = SD.predictFcn(TestTable);
y22 = SKNN.predictFcn(TestTable);
y23 = RUSTrees.predictFcn(TestTable);
y = [y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14...
y15 y16 y17 y18 y19 y20 y21 y22 y23];
YTest = regexp(ytest,'\d+(\.)?(\d+)?','match');
Ytest = str2double([YTest{:}])';
Y = zeros(size(y,2),size(y,1));
figure;
set(gcf,'units','normalized','outerposition',[0 0 1 1]);
for ii = 1:size(y,2)
for jj = 1:size(y,1)
out = regexp(y(jj,ii),'\d+(\.)?(\d+)?','match');
Y(jj,ii) = str2double([out{:}])';
end
subplot(4,6,ii)
cm = confusionchart(Ytest,Y(:,ii));
cm.Title = models{ii};
end

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by