Unformatted text preview: %alph : is assumed to be in column. %first we have to compute the kernel matrix. K is N by 1 in this case. %first of all obtain the size of training data thus the kernel matrix [m,n] = size(xtrain); if(m>n) sizeK = m; else sizeK = n; end K=zeros(sizeK,1); for i = 1:sizeK K(i,1) = exp(- ((norm( xtrain(:,i) - xtest ))^2)/(2*sg^2) ); end val = alph'*K(:,1) + d;...
View Full Document
This note was uploaded on 07/04/2011 for the course ECE 501 taught by Professor Deniz during the Spring '11 term at Istanbul Universitesi.
- Spring '11