Skip to content

Commit

Permalink
aesthetics
Browse files Browse the repository at this point in the history
  • Loading branch information
steven2358 committed Dec 7, 2015
1 parent e48c6f4 commit ff88eb6
Show file tree
Hide file tree
Showing 23 changed files with 33 additions and 35 deletions.
4 changes: 2 additions & 2 deletions demo/km_demo_akcca.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear
rs = 1; % seed for random generator
rng('default')
rng(rs)
Expand Down Expand Up @@ -126,4 +126,4 @@
figure; hold all
plot(s(vars.ind_s))
plot(sc*eval.s_est);
legend('source signal','recovered signal')
legend('source signal','recovered signal')
4 changes: 2 additions & 2 deletions demo/km_demo_kcca.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
% This file is part of the Kernel Methods Toolbox for MATLAB.
% https://github.com/steven2358/kmbox

close all; clear all
close all; clear
rs = 1; % seed for random generator
rng('default')
rng(rs)
Expand Down Expand Up @@ -82,4 +82,4 @@
fprintf('\n')

% figure;plot(sort(diag(real(betas)))) % check eigenvalues
% figure;plot(sort(diag(betas))); % imaginary part due to numerical error
% figure;plot(sort(diag(betas))); % imaginary part due to numerical error
4 changes: 2 additions & 2 deletions demo/km_demo_kcca_full.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
% This file is part of the Kernel Methods Toolbox for MATLAB.
% https://github.com/steven2358/kmbox

close all; clear all
close all; clear
rs = 1; % seed for random generator
rng('default')
rng(rs)
Expand Down Expand Up @@ -83,4 +83,4 @@
fprintf('\n')

% figure;plot(sort(diag(real(betas)))) % check eigenvalues
% figure;plot(sort(diag(betas))); % imaginary part due to numerical error
% figure;plot(sort(diag(betas))); % imaginary part due to numerical error
4 changes: 2 additions & 2 deletions demo/km_demo_kde.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -41,4 +41,4 @@
hold on
plot(xx,pp,'r','LineWidth',3);

legend('histogram','KDE')
legend('histogram','KDE')
2 changes: 1 addition & 1 deletion demo/km_demo_kiham.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

%% STATE

close all; clear all
close all; clear
% rs = sum(100*clock);
rs = 1; % seed for random generator
rng('default')
Expand Down
4 changes: 2 additions & 2 deletions demo/km_demo_kpca_3clusters.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -74,4 +74,4 @@
'MarkerFaceColor','White','MarkerEdgeColor','Black')
set(gca, 'XTick', [])
set(gca, 'YTick', [])
end
end
4 changes: 2 additions & 2 deletions demo/km_demo_kpca_u.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -81,4 +81,4 @@
'MarkerFaceColor','White','MarkerEdgeColor','Black')
set(gca, 'XTick', [])
set(gca, 'YTick', [])
end
end
4 changes: 2 additions & 2 deletions demo/km_demo_krls_mg30.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -143,4 +143,4 @@
plot(y_test,'b')
plot(y_est,'g')
legend({'Test output','Estimated output'})
title(sprintf('%s mem=%d',pars.algo,length(vars.basis)))
title(sprintf('%s mem=%d',pars.algo,length(vars.basis)))
4 changes: 2 additions & 2 deletions demo/km_demo_krls_wiener.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -116,4 +116,4 @@
plot(y_test,'b')
plot(y_est,'g')
legend({'Test output','Estimated output'})
title(sprintf('%s, m=%d',pars.algo,pars.M))
title(sprintf('%s, m=%d',pars.algo,pars.M))
4 changes: 2 additions & 2 deletions demo/km_demo_krlst.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -99,4 +99,4 @@
plot(y_test,'b')
plot(y_est,'g')
legend({'Test output','Estimated output'})
title(sprintf('KRLS-T m=%d',pars.M))
title(sprintf('KRLS-T m=%d',pars.M))
4 changes: 2 additions & 2 deletions demo/km_demo_krr.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down Expand Up @@ -42,4 +42,4 @@
plot(x2,y2,'r');
plot(x2,y2sinc,':','Color',[.5 .5 .5])
legend('noisy data','regression','true sinc function')
title('Kernel ridge regression demo')
title('Kernel ridge regression demo')
2 changes: 1 addition & 1 deletion demo/km_demo_krr_icd.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% https://sourceforge.net/projects/kmbox

close all
clear all
clear

%% PARAMETERS

Expand Down
3 changes: 1 addition & 2 deletions demo/km_demo_pca.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

Expand All @@ -33,4 +33,3 @@
axis equal
legend('data','first principal components','first principal direction','second principal direction')
title('linear PCA demo')

4 changes: 2 additions & 2 deletions demo/km_demo_template.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
% https://github.com/steven2358/kmbox

close all
clear all
clear

%% PARAMETERS

%% PROGRAM
tic

toc
%% OUTPUT
%% OUTPUT
2 changes: 1 addition & 1 deletion lib/km_akcca.m
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,4 @@
err_vec = data_1_norm - sc*data_2;

MSE = err_vec'*err_vec;
sc = sc*norm(data_1);
sc = sc*norm(data_1);
2 changes: 1 addition & 1 deletion lib/km_aldkrls.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@
vars.basis = basis;

out = vars;
end
end
1 change: 0 additions & 1 deletion lib/km_kde.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@
for i=1:N,
y = y + 1/N*c*exp(-(data(i)-x).^2/(2*sigma^2));
end

2 changes: 1 addition & 1 deletion lib/km_kernel.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@

otherwise % default case
error ('unknown kernel type')
end
end
2 changes: 1 addition & 1 deletion lib/km_krr.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
alpha = (K+c*I)\Y;

K2 = km_kernel(X2,X,ktype,kpar);
Y2 = K2*alpha;
Y2 = K2*alpha;
2 changes: 1 addition & 1 deletion lib/km_krr_icd.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
alpha = K\Y;

K2 = km_kernel(X2,X(subset,:),ktype,kpar);
Y2 = K2*alpha;
Y2 = K2*alpha;
2 changes: 1 addition & 1 deletion lib/km_norma.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@
vars.basis = basis;

varout = vars;
end
end
2 changes: 1 addition & 1 deletion lib/km_pca.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
[v,ind] = sort(v,'descend');
E = E(:,ind);

Xp = X*E(:,1:m);
Xp = X*E(:,1:m);
2 changes: 1 addition & 1 deletion lib/km_qklms.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@
vars.basis = basis;

varout = vars;
end
end

0 comments on commit ff88eb6

Please sign in to comment.