Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



chi squared kernel equation
Posted:
Jan 14, 2014 7:34 AM


please i have two equation for chi square kernel and i want to know which one is correct ,where one without exp and another with exp? first one is : K(x, y) =1D
D=sum[(xiyi)^2./((1/2)x+y)] and implementation is
function D = chi2Kernel(X,Y) D = zeros(size(X,1),size(Y,1)); for i=1:size(Y,1) d = bsxfun(@minus, X, Y(i,:)); s = bsxfun(@plus, X, Y(i,:)); D(:,i) = sum(d.^2 ./ (s/2+eps), 2); end D = 1  D; end
second one is K(xi; xj) = 1/A exp(D(xi; xj));



