-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test_prediction_plots.m
71 lines (65 loc) · 1.33 KB
/
Test_prediction_plots.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
close all;
user_inder=1;
program_index=1;
xx=0.05:0.1:0.95;
rmse_yaw_frac=zeros(9,size(xx,2));
rmse_pitch_frac=zeros(9,size(xx,2));
k=1;
for user_index=1:1:3
for program_index=1:1:3
j=1;
for frac=xx
close all;
[rmse_pitch_frac(k,j),rmse_yaw_frac(k,j)]=I2MB_lstm_pitch_angle(user_index,program_index,frac,50);
j=j+1;
end
k=k+1;
end
end
xx=10:10:100;
rmse_yaw_iter=zeros(9,size(xx,2));
rmse_pitch_iter=zeros(9,size(xx,2));
k=1;
for user_index=1:1:3
for program_index=1:1:3
j=1;
for iter=xx
close all;
[rmse_pitch_iter(k,j),rmse_yaw_iter(k,j)]=I2MB_lstm_pitch_angle(user_index,program_index,0.5,iter);
j=j+1;
end
k=k+1;
end
end
xx=0.05:0.1:0.95;
for i=1:1:size(xx,2)
rpf(i,1)=sum(rmse_pitch_frac(:,i))/9;
end
for i=1:1:size(xx,2)
ryf(i,1)=sum(rmse_yaw_frac(:,i))/9;
end
figure
subplot(1,2,1)
plot(xx*30,rpf,'r-x');
hold all
subplot(1,2,1)
plot(xx*30,ryf,'b:O');
xlabel('Training user data duration (sec)')
ylabel('RMSE')
legend('Pitch','Yaw');
hold all
xx=10:10:100;
for i=1:1:size(xx,2)
rpi(i,1)=sum(rmse_pitch_iter(:,i))/9;
end
for i=1:1:size(xx,2)
ryi(i,1)=sum(rmse_yaw_iter(:,i))/9;
end
subplot(1,2,2)
plot(xx,rpi,'r-x');
hold all
subplot(1,2,2)
plot(xx,ryi,'b:O');
xlabel('Max training epochs (iterations)')
ylabel('RMSE')
legend('Pitch','Yaw');