# Support Vector Classifier¶

Support vector machine (SVM) based classifier

**Documentation**

Support vector machine (SVM) based classifier

*Configuration*:

CRegularization parameter. The strength of the regularization is inversely proportional to C. Must be strictly positive. The penalty is a squared l2 penalty.

kernelSpecifies the kernel type to be used in the algorithm. It must be one of ‘linear’, ‘poly’, ‘rbf’, ‘sigmoid’, ‘precomputed’ or a callable. If none is given, ‘rbf’ will be used. If a callable is given it is used to pre-compute the kernel matrix from data matrices; that matrix should be an array of shape

`(n_samples, n_samples)`

.

degreeDegree of the polynomial kernel function (‘poly’). Ignored by all other kernels.

gammaKernel coefficient for ‘rbf’, ‘poly’ and ‘sigmoid’.

if

`gamma='scale'`

(default) is passed then it uses 1 / (n_features * X.var()) as value of gamma,if ‘auto’, uses 1 / n_features.

Changed in version 0.22: The default value of

`gamma`

changed from ‘auto’ to ‘scale’.

coef0Independent term in kernel function. It is only significant in ‘poly’ and ‘sigmoid’.

probabilityWhether to enable probability estimates. This must be enabled prior to calling fit, will slow down that method as it internally uses 5-fold cross-validation, and predict_proba may be inconsistent with predict. Read more in the User Guide <scores_probabilities>.

shrinkingWhether to use the shrinking heuristic. See the User Guide <shrinking_svm>.

class_weightSet the parameter C of class i to class_weight[i]*C for SVC. If not given, all classes are supposed to have weight one. The “balanced” mode uses the values of y to automatically adjust weights inversely proportional to class frequencies in the input data as

`n_samples / (n_classes * np.bincount(y))`

tolTolerance for stopping criterion.

max_iterHard limit on iterations within solver, or -1 for no limit.

random_stateControls the pseudo random number generation for shuffling the data for probability estimates. Ignored when probability is False. Pass an int for reproducible output across multiple function calls. See random_state.

*Attributes*:

support_Indices of support vectors.

support_vectors_Support vectors.

n_support_Number of support vectors for each class.

dual_coef_Dual coefficients of the support vector in the decision function (see sgd_mathematical_formulation), multiplied by their targets. For multiclass, coefficient for all 1-vs-1 classifiers. The layout of the coefficients in the multiclass case is somewhat non-trivial. See the multi-class section of the User Guide for details.

coef_Dual coefficients of the support vector in the decision function (see sgd_mathematical_formulation), multiplied by their targets. For multiclass, coefficient for all 1-vs-1 classifiers. The layout of the coefficients in the multiclass case is somewhat non-trivial. See the multi-class section of the User Guide for details.

intercept_Constants in decision function.

*Input ports*:

*Output ports*:**model**modelModel

**Definition**

*Input ports*

*Output ports*

- model
model

Model