0

I want to use a chi squared kernel with svmtrain in matlab but I can not find an implementation on internet. Does any one know how to make a custom MATLAB kernel for the matlab function svmtrain?

anirudh
  • 562
  • 6
  • 23

2 Answers2

0

You can pass an anonymous function @(x,y) 1 - sum((x - y).^2 ./ (x + y) / 2) as the kernel_function argument.

Memming
  • 1,731
  • 13
  • 25
0

You can accomplish this by using precomputed kernels, an excellent example and a more detailed explanation can be found in this question: using precomputed kernels with libsvm

Community
  • 1
  • 1
Robin
  • 8,197
  • 11
  • 45
  • 74