Search code examples
c#accord.net

How to build a RBF kernel SVM classifier using Accord.NET including hyperparameter optimisation tuning?


I have been using libsvm, but now for various reasons I want to switch to using Accord.NET.

I would like to build an SVM with RBF kernel (which appears to be called Gaussian kernel in Accord.NET?). However, I also want to do this with hyper-parameter tuning, as in, to optimise cost and gamma.

I learn best by example, so if anyone has a sample of how to do this, it would be really helpful. Otherwise, if you could at least point me in the direction of the correct API references, that could also work.


Solution

  • Accord provides several kernels that inherit from the IRadialBasisKernel interface:

    IRadialBasisKernel

    There are a few examples in the docs for optimizing SVM's:

    GridSearch