LCSL / GURLS

GURLS: a Least Squares Library for Supervised Learning
http://lcsl.mit.edu/#/downloads/gurls
63 stars 37 forks source link

Added Nystrom KRLS algorithm implementation in GURLS for Matlab #22

Closed raffaello-camoriano closed 8 years ago

raffaello-camoriano commented 8 years ago

Added plain Nystrom KRLS algorithm with Tikhonov regularization. It is useful for instance for datasets in which the number of training points n is so large that the kernel matrix K does not fit in memory. See: http://arxiv.org/abs/1303.1849 Cross validation of sigma and lambda supported. Only supports Gaussian kernel at the moment.

Example:

load(fullfile(gurls_root,'demo/data/breastcancer_data.mat'));

% Gaussian kernel approximated with Nystrom subsampling (m=200).
% Hold Out cross validation to select lambda and the Kernel width sigma

name = 'nysrbfho';
opt = gurls_defopt(name);
opt.seq = {'split:ho', 'paramsel:siglamho_nystrom', 'kernel:rbf_nystrom', 'rls:dual_nystrom', 'predkernel:traintest_nystrom', 'pred:dual_nystrom', 'perf:rmse'};
opt.process{1} = [2,2,2,2,0,0,0];
opt.process{2} = [3,3,3,3,2,2,2];

opt.nystrom.shuffle = 0;
opt.nystrom.m = 200;
opt.hoperf = @perf_rmse;

gurls (Xtr, ytr, opt,1);
gurls (Xte, yte, opt,2);