sklearn.svm.libsvm.cross_validation

sklearn.svm.libsvm.cross_validation()

Binding of the cross-validation routine (low-level routine)

Parameters
Xarray-like, dtype=float, size=[n_samples, n_features]
Yarray, dtype=float, size=[n_samples]

target vector

svm_type{0, 1, 2, 3, 4}

Type of SVM: C SVC, nu SVC, one class, epsilon SVR, nu SVR

kernel{‘linear’, ‘rbf’, ‘poly’, ‘sigmoid’, ‘precomputed’}

Kernel to use in the model: linear, polynomial, RBF, sigmoid or precomputed.

degreeint

Degree of the polynomial kernel (only relevant if kernel is set to polynomial)

gammafloat

Gamma parameter in rbf, poly and sigmoid kernels. Ignored by other kernels. 0.1 by default.

coef0float

Independent parameter in poly/sigmoid kernel.

tolfloat

Stopping criteria.

Cfloat

C parameter in C-Support Vector Classification

nufloat
cache_sizefloat
random_seedint, optional

Seed for the random number generator used for probability estimates. 0 by default.

Returns
targetarray, float