-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathay_plot_result_study_jan18_2017.m
212 lines (163 loc) · 5.95 KB
/
ay_plot_result_study_jan18_2017.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
T=linspace(log(0.4),log(2.4),18);
LEFT_BASE = 0.089226;
A = load('normal_binary_count.txt');
Ns = A(:,6:6:end);
T = 100-mean(Ns);
figure(1)
A = load('normal.txt');
At = sqrt(A(:,1:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
%h=errorbar(T,mA,sA,'b','LineWidth',2,'MarkerSize',2);hold on;
h(1)=ay_plot_bound_a(1,T,mA,(mA-sA),(mA+sA));hold on;
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,5:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(2)=ay_plot_bound_a(2,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,3:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(3)=ay_plot_bound_a(3,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,4:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(4)=ay_plot_bound_a(4,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);hold off;
xlabel('Expected Percentage of Censored Data');
ylabel('RMSE');
legend([h(1),h(2),h(3),h(4)],'Exact','Imputation','Deletion','Approximate','Location','northwest');
title('Reaction Time Observation','FontWeight','Normal')
xlim([1 100])
grid
ylim([0.5 4]* LEFT_BASE)
h=gca;
set(h,'YTick',[0.5 1 1.5 2 2.5 3 3.5 4]* LEFT_BASE)
hold on
set(gca,'Box','off');
axesPosition = get(gca,'Position');
hNewAxes = axes('Position',axesPosition,... %# Place a new axes on top...
'Color','none',... %# ... with no background color
'YLim',[0.5 4],... %# ... and a different scale
'YTick',[0.5 1 1.5 2 2.5 3 3.5 4],...
'YAxisLocation','right',... %# ... located on the right
'XTick',[],... %# ... with no x tick marks
'Box','off');
ylabel(hNewAxes,'Normalized RMSE');
% Create second Y axes on the right.
figure(2)
A = load('normal_count.txt');
At = A(:,1:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(1)=ay_plot_bound_a(1,T,mA,(mA-sA),(mA+sA));hold on;
plot(T,mA,'ko','LineWidth',1);
At = A(:,5:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(A(:,1)));
h(2)=ay_plot_bound_a(2,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = A(:,3:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(3)=ay_plot_bound_a(3,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = A(:,4:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(4)=ay_plot_bound_a(4,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
xlabel('Expected Percentage of Censored Data');
ylabel('Coverage of 95% HPD Region');
legend([h(1),h(2),h(3),h(4)],'Exact','Imputation','Deletion','Approximate','Location','southwest');
%title('Reaction Time Observation','FontWeight','Normal')
%title('Reaction Time Observation')
xlim([1 100])
ylim([40 100])
grid on
% figure(13);
% At = A(:,5:5:end);
% mA= mean(At);
% sA= std(At); sA = sA/sqrt(length(At(:,1)));
% errorbar(T,mA,sA,'b','LineWidth',2);
% xlabel('Number of observed data');
% ylabel('Number of Observed Samples');
%
%
%
figure(3)
A = load('normal_binary.txt');
At = sqrt(A(:,1:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
%h=errorbar(T,mA,sA,'b','LineWidth',2,'MarkerSize',2);hold on;
h(1)=ay_plot_bound_a(1,T,mA,(mA-sA),(mA+sA));hold on;
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,5:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(2)=ay_plot_bound_a(2,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,3:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(3)=ay_plot_bound_a(3,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = sqrt(A(:,4:5:end));
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(4)=ay_plot_bound_a(4,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);hold off;
xlabel('Expected Percentage of Censored Data');
ylabel('RMSE');
legend([h(1),h(2),h(3),h(4)],'Exact','Imputation','Deletion','Approximate','Location','northwest');
title('Reaction Time plus Binary Decision Observation','FontWeight','Normal')
xlim([1 100])
grid
ylim([0.5 4]* LEFT_BASE)
h=gca;
set(h,'YTick',[0.5 1 1.5 2 2.5 3 3.5 4]* LEFT_BASE)
hold on
set(gca,'Box','off');
axesPosition = get(gca,'Position');
hNewAxes = axes('Position',axesPosition,... %# Place a new axes on top...
'Color','none',... %# ... with no background color
'YLim',[0.5 4],... %# ... and a different scale
'YTick',[0.5 1 1.5 2 2.5 3 3.5 4],...
'YAxisLocation','right',... %# ... located on the right
'XTick',[],... %# ... with no x tick marks
'Box','off');
ylabel(hNewAxes,'Normalized RMSE');
% Create second Y axes on the right.
figure(4)
A = load('normal_binary_count.txt');
At = A(:,1:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(1)=ay_plot_bound_a(1,T,mA,(mA-sA),(mA+sA));hold on;
plot(T,mA,'ko','LineWidth',1);
At = A(:,5:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(A(:,1)));
h(2)=ay_plot_bound_a(2,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = A(:,3:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(3)=ay_plot_bound_a(3,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
At = A(:,4:6:end);
mA= mean(At);
sA= std(At); sA = 2*sA/sqrt(length(At(:,1)));
h(4)=ay_plot_bound_a(4,T,mA,(mA-sA),(mA+sA));
plot(T,mA,'ko','LineWidth',1);
xlabel('Expected Percentage of Censored Data');
ylabel('Coverage of 95% HPD Region');
legend([h(1),h(2),h(3),h(4)],'Exact','Imputation','Deletion','Approximate','Location','southwest');
%title('Reaction Time plus Binary Decision Observation','FontWeight','Normal')
%title('Reaction Time Observation')
xlim([1 100])
ylim([40 100])
grid on