简体   繁体   中英

why using precomputed kernels with libsvm in matlab

I am new to MATLAB and to LIBSVM. I got the fact that to use precomputed kernel, you must include sample serial number as the first column of the training and testing data. But importantly what I don't understand is: why would I use precomputed kernels? I am following the script described in LIBSVM and got results for linear and RBF but do not understand the need to use precomputed kernels.

Whether you need precomputed kernels depends on your metrics of input vectors. Sometimes you may need a different similarity function other than the norm-2 Euclidean distance or the radial basis function between a given feature to all the features from training set.

It is also possible that you need a multiplicative kernel (for example the product of two different kernel functions), which is not feasible by choosing one kernel type from Libsvm. Then writing a precomputed kernel is a good option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM