[pymvpa] LibSVM precomputed kernels

Andreas Mueller amueller at ais.uni-bonn.de
Mon Sep 27 08:38:44 UTC 2010

On 09/24/2010 08:33 PM, Yaroslav Halchenko wrote:
> please share how it is possible in LibSVM and we will make it possible
> in pymvpa... I guess we have missed that since I thought it is possible
> only with CustomKernel from shogun (i.e. now you can use shogun's
> interface to achieve that, in the development branch, series 0.5, of
Thanks, that would be greate.
Also I will look into the development branch for the shogun interface.

About Libsvm:
You are probably interested in how it is possible over the C API.
I only use the command line interface and how to use precomputed kernels
with that is documented in the README.
By the way, I am using libsvm version 2.91.

As far as I can see the kernel_type defined in svm.h lists a PRECOMPUTED 
This makes the k_function behave appropriately.
The function read_problem in svm-train.c shows how to build a a "problem"
from a given kernel matrix.

Hope that helps.

Cheers Andy

More information about the Pkg-ExpPsy-PyMVPA mailing list