-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEMBC2014_en_function_r_knn.m
executable file
·67 lines (55 loc) · 1.77 KB
/
EMBC2014_en_function_r_knn.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
% Plot entropy as function of k and epsilon
% Jiri Spilka, Patrice Abry, ENS Lyon 2014
clear;
close all; clc
bRR = false;
rstdtot = 0.1:0.1:1;
addpath(fullfile(pwd, 'data'));
%% RR data
if bRR
load('entropy_RR_vary_r_knn_140310')
sName = 'entropy_RR_param_r_knn';
apen = aaApenRR;
sampen = aaSampRR;
en = aaEnRR;
else
%% Gaussian WN
sName = 'entropy_WN_param_r_knn';
load entropy_synthetic_vary_r_knn_140310.mat
apen = Ae';
sampen = sAE';
en = myAe';
end
%% figure properties
nFontSize = 11;
sFontName = 'Times'; % [Times | Courier | ] TODO complete the list
sInterpreter = 'latex'; % [{tex} | latex]
ms = 4;
lw = 1;
for i = 1:size(apen,1)
apen(i,:) = apen(i,:) + log(2*rstdtot);
sampen(i,:) = sampen(i,:) + log(2*rstdtot);
end
figure
hold on
errorbar(rstdtot,mean(apen),std(apen),'--xb','MarkerSize',ms)
errorbar(rstdtot,mean(sampen),std(sampen),'--ok','MarkerSize',ms)
errorbar(rstdtot,mean(en),std(en),'--sr','MarkerSize',ms)
grid on;
a = axis;
axis([0 1.1 a(3) 1.6])
%axis([a(1) 1 0 3])
%setFigureSizeProp([1 1 8 7.5]); % [pos_x pos_y width_x width_y]
set(gca,'FontName',sFontName,'FontSize',nFontSize)
ylabel('$h_{32}$','FontName',sFontName,'FontSize', nFontSize, ...
'Interpreter', sInterpreter);
xlabel('$\epsilon, k/10$','FontName',sFontName,'FontSize', nFontSize, ...
'Interpreter', sInterpreter);
% asLabels = [{'AE'};{'SE'};{'kNN'}];
% [hleg1, hobj1] = legend( asLabels,'Location','best','Box','on','Interpreter',sInterpreter);
% textobj = findobj(hobj1, 'type', 'text');
% set(textobj,'fontsize', nFontSize-2);
%% print
% print(1, '-depsc', sName);
% unix(['epstopdf ' sName, '.eps']);
% unix(['cp ' sName, '.pdf /home/jirka/svn_working_copy/iga_brno/doc/papers/2014_EMBC_stephane_entropy/images/' sName '.pdf']);