0

I would like to use the chi2 kernel instead of the linear kernel in vlfeat.

Here is an example of using chi2.

"... % create a structure with kernel map parameters
hom.kernel = 'KChi2';
hom.order = 2;
% create the dataset structure
dataset = vl_svmdataset(X, 'homkermap', hom);
% learn the SVM with online kernel map expansion using the dataset structure
[w b info] = vl_svmtrain(dataset, y, lambda, 'MaxNumIterations', maxIter)..."

What exactly happens here? What does hom.order do?

What does vl_svmdataset do? Also, there is a function called vl_homkermap(). What does it do?

Let's say I got a matrix m and I would like to use svm on it with the chi2 kernel.

How do I do that?

1 Answers1

0

Large scale non-linear support vector machines (SVMs) can be approximated by linear ones using a suitable feature map. The linear SVMs are in general much faster to learn and evaluate (test) than the original non-linear, you may consult to this paper for the detail.

dataset = vl_svmdataset(X, 'homkermap', hom); this line transform your data X to the 'chi-square' kernel map

[w b info] = vl_svmtrain(dataset, y, lambda, 'MaxNumIterations', maxIter) this line train a linear SVM for the transformed data in this case lambda is regularization parameter more detail can be find here