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?
Asked
Active
Viewed 1,811 times
2 Answers
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