-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotPicture.m
42 lines (34 loc) · 1.32 KB
/
plotPicture.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% draw figure from row n to row n+4
testDataNum = 4;
ax = cell(1,5);
pre = cell(1,5);
test = cell(1,5);
n = int16(length(testLabels{1}(:,1))/5);
for i =1:5
ax{i} = subplot(5,2,2*i-1);
x = (1:length(labels(1,:)));
row = indexSortLoss(1+(i-1)*n,testDataNum);
pre{i} = preLabels{testDataNum}(row,:);
test{i} = testLabels{testDataNum}(row,:);
plot(ax{i},x,pre{i},'g',x,test{i},'r');
title(ax{i},[strcat("sortLossRank:",string(1+(i-1)*n),"/",string(length(preLabels{testDataNum}(:,1)))),strcat(" SortLoss:",string(SortLoss(row,testDataNum)))]);
end
for i =1:5
ax{i} = subplot(5,2,2*i);
x = (1:length(labels(1,:)));
row = indexKL(1+(i-1)*n,testDataNum);
pre{i} = preLabels{testDataNum}(row,:);
test{i} = testLabels{testDataNum}(row,:);
plot(ax{i},x,pre{i},'g',x,test{i},'r');
title(ax{i},[strcat("KLRank:",string(1+(i-1)*n),"/",string(length(preLabels{testDataNum}(:,1)))),strcat(" KL:",string(KL(row,testDataNum)))]);
end
% for i =1:5
% ax{i} = subplot(5,3,3*i);
% x = (1:length(labels(1,:)));
% row = indexSK(1+(i-1)*n,testDataNum);
% pre{i} = preLabels{testDataNum}(row,:);
% test{i} = testLabels{testDataNum}(row,:);
% plot(ax{i},x,pre{i},'g',x,test{i},'r');
% title(ax{i},[row," SK:",SK(row,testDataNum)]);
% end
clear n ans ax x pre test testDataNum row i;