


FORMAT K_normalised = prt_normalise_kernel(K) This function normalises the kernel matrix such that each entry is divided by the product of the std deviations, i.e. K_new(x,y) = K(x,y) / sqrt(var(x)*var(y)) __________________________________________________________________________ Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory


0001 function K_normalised = prt_normalise_kernel(K) 0002 0003 % FORMAT K_normalised = prt_normalise_kernel(K) 0004 % 0005 % This function normalises the kernel matrix such that each entry is 0006 % divided by the product of the std deviations, i.e. 0007 % K_new(x,y) = K(x,y) / sqrt(var(x)*var(y)) 0008 %__________________________________________________________________________ 0009 % Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory 0010 0011 % Written by A. Marquand 0012 % $Id: prt_normalise_kernel.m 135 2011-10-11 10:21:27Z amarquan $ 0013 0014 d = diag(K); 0015 K0 = sqrt(repmat(d,[1,size(K,1)]).* repmat(d',[size(K,1),1])); 0016 K_normalised = K./K0; 0017 0018 return