8.24.3.1. sklearn.svm.libsvm.fit¶
- sklearn.svm.libsvm.fit()¶
Train the model using libsvm (low-level method)
Parameters : X: array-like, dtype=float64, size=[n_samples, n_features] :
Y: array, dtype=float64, size=[n_samples] :
target vector
svm_type : {0, 1, 2, 3, 4}
Type of SVM: C_SVC, NuSVC, OneClassSVM, EpsilonSVR or NuSVR respectevely.
kernel : {‘linear’, ‘rbf’, ‘poly’, ‘sigmoid’, ‘precomputed’}
Kernel to use in the model: linear, polynomial, RBF, sigmoid or precomputed.
degree : int32
Degree of the polynomial kernel (only relevant if kernel is set to polynomial)
gamma : float64
Gamma parameter in RBF kernel (only relevant if kernel is set to RBF)
coef0 : float64
Independent parameter in poly/sigmoid kernel.
tol : float64
Stopping criteria.
C : float64
C parameter in C-Support Vector Classification
nu : float64
cache_size : float64
Returns : support : array, shape=[n_support]
index of support vectors
support_vectors : array, shape=[n_support, n_features]
support vectors (equivalent to X[support]). Will return an empty array in the case of precomputed kernel.
n_class_SV : array
number of support vectors in each class.
sv_coef : array
coefficients of support vectors in decision function.
intercept : array
intercept in decision function
label : labels for different classes (only relevant in classification).
probA, probB : array
probability estimates, empty array for probability=False