The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: chi squared kernel equation
Replies: 1   Last Post: Jan 14, 2014 6:28 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
amira ali

Posts: 160
Registered: 5/15/11
chi squared kernel equation
Posted: Jan 14, 2014 7:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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) =1-D

D=sum[(xi-yi)^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);
D = 1 - D;

second one is K(xi; xj) = -1/A exp(D(xi; xj));

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.