Scikit-Learn
65
SVM in Scikit-learn supports both sparse and dense sample vectors as input.
Classification of SVM
Scikit-learn provides
three classes namely
SVC, NuSVC
and
LinearSVC
which can
perform multiclass-class classification.
SVC
It is C-support vector classification whose implementation is based on
libsvm
. The module
used
by scikit-learn is
sklearn.svm.SVC
.
This class handles
the multiclass support
according to one-vs-one scheme.
Parameters
Followings table consist
the parameters used by
sklearn.svm.SVC
class:
Parameter
Description
C:
float, optional,
default = 1.0
It is the penalty parameter of the error term.
kernel:
string,
optional, default =
‘rbf’
This parameter specifies the type of kernel to be used in the algorithm.
we
can choose any one among, ‘
linear
’, ‘
poly
’, ‘
rbf
’, ‘
sigmoid
’,
‘
precomputed
’. The default value of kernel would be ‘
rbf
’.
degree:
int,
optional, default = 3
It represents the degree of the ‘poly’ kernel function and will be ignored
by all other kernels.
gamma:
{‘scale’,
‘auto’}
or
float,
It is the kernel coefficient for kernels ‘rbf’, ‘poly’ and ‘sigmoid’.
Hyperplane
Dostları ilə paylaş: