This preview shows page 1. Sign up to view the full content.
Unformatted text preview: %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) ); % Be carefull with the value of sg or sg^2 end val = bet*sum(K(:,1)) + alph'*K(r:end,1) + d; v...
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