-
Notifications
You must be signed in to change notification settings - Fork 5
/
plotgraphs2.m
executable file
·56 lines (43 loc) · 1.96 KB
/
plotgraphs2.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
43
44
45
46
47
48
49
50
51
52
53
54
55
function [] = plotgraphs2()
% UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
minvtopic = 2;
filename1 = ['finalbigrun6.mat'];
filename2 = ['finalbigrun6_std.mat'];
savefilepath = '/v/filer4b/v16q001/data/Ayans/Results_finalbigrun6/';
A = load(filename1);
B = load(filename2);
k2mat = [20:10:200];
for pind =1:10
C = squeeze(A.savedstat(pind,:,:));
C(:,3) = C(:,3);
D = squeeze(B.savedstatstd(pind,:,:));
%%C(:,2)
%%D(:,2)
p = [0.1:0.1:1]';
rbaseline = 0.23*ones(size(k2mat));
figure (1);
%%errorbar(k2mat,C(:,1),D(:,1),'r.-', 'LineWidth',2, 'MarkerEdgeColor','r','MarkerSize',15); hold on;
errorbar(k2mat,C(:,2),D(:,2),'g.-','LineWidth',2, 'MarkerEdgeColor','g','MarkerSize',15); hold on;
errorbar(k2mat,C(:,3),D(:,3),'b.-','LineWidth',2, 'MarkerEdgeColor','b','MarkerSize',15); hold on;
errorbar(k2mat,C(:,4),D(:,4),'k.-','LineWidth',2, 'MarkerEdgeColor','k','MarkerSize',15); hold on;
errorbar(k2mat,C(:,5),D(:,5),'r.-','LineWidth',2, 'MarkerEdgeColor','r','MarkerSize',15); hold on;
errorbar(k2mat,C(:,6),D(:,6),'m.-','LineWidth',2, 'MarkerEdgeColor','m','MarkerSize',15); hold on;
plot(k2mat,rbaseline,'c.-', 'LineWidth',1.5); grid on, hold on;
t = xlabel('number of latent topics'); hold on;
set(t, 'FontSize', 14);
t = ylabel('over-all classification accuracy'); hold on;
set(t, 'FontSize', 14);
titlestr = ['Learning curve for p = ' num2str(p(pind))];
t = title(titlestr);
set(t, 'FontSize', 14);
set(findobj('type','axes'),'fontsize',12);
set(gca,'XLim',[0 220]);
set(gca,'YLim',[0.1 1]);
hold on;
%%legend({'medLDA-OVA', 'DSLDA-NSLT', 'medLDA-MTL', 'DSLDA', 'DSLDA-OSST', 'random'}, 'Location','NorthWest');
legend({'medLDAOVA', 'DSLDANSLT', 'medLDA', 'DSLDA', 'DSLDAOSST', 'random'}, 'Location','NorthWest');
hold off;
saveas(gcf,[savefilepath num2str(minvtopic) '_' titlestr '.jpg']);
end
end