Skip to content

[source]

SVC#

The multiclass Support Vector Machine (SVM) Classifier is a maximum margin classifier that can efficiently perform non-linear classification by implicitly mapping feature vectors into high-dimensional feature space using the kernel trick.

Note

This learner requires the SVM extension which uses the libsvm engine under the hood.

Interfaces: Estimator, Learner

Data Type Compatibility: Continuous

Parameters#

# Name Default Type Description
1 c 1.0 float The parameter that defines the width of the margin used to separate the classes.
2 kernel RBF Kernel The kernel function used to operate in higher dimensions.
3 shrinking true bool Should we use the shrinking heuristic?
4 tolerance 1e-3 float The minimum change in the cost function necessary to continue training.
5 cache size 100.0 float The size of the kernel cache in MB.

Example#

use Rubix\ML\Classifiers\SVC;
use Rubix\ML\Kernels\SVM\Linear;

$estimator = new SVC(1.0, new Linear(), true, 1e-3, 100.0);

Additional Methods#

Save the model data to the filesystem:

public save(string $path) : void

Load the model data from the filesystem:

public load(string $path) : void

References#


  1. C. Chang et al. (2011). LIBSVM: A library for support vector machines. 


Last update: 2021-03-03