sklearn integrated support vector machine svm.SVC Parameter Description

Sklearn frequently used in the SVC function, parameter where the document translated some for a rainy day.

This function is also based on libsvm itself to achieve, so there are many similarities in the parameter settings. (PS: quadratic programming algorithm to solve the problem libsvm is SMO).
sklearn.svm.SVC ( C = 1.0 , Kernel = 'RBF' , Degree =. 3 , Gamma = 'Auto' , coef0 = 0.0 , Shrinking = True , Probability = False ,

tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=-1, decision_function_shape=None,random_state=None)

parameter:

C:? C-SVC penalty parameter C default value is 1.0

The larger C, corresponding to the slack variable penalty desirable slack variable is close to 0, i.e. punishment misclassification increases, tend to be the case for the full diversity training set, so that when very high accuracy of the test the training set, but the generalization weak capacity. C value is small, penalties for misclassification is reduced, allowing the fault-tolerant, point to them as noise, strong generalization ability.

Kernel : kernel, default RBF , may be 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'

  0 - Linear: u'v

   1-- polynomial: (gamma * u '* v + coef0) ^ degree

  2 - RBF function: exp (-gamma | uv | ^ 2)

  3 -sigmoid: tanh (gamma * u '* v + coef0)

Degree : polynomial poly dimensions function, the default is 3 , will be ignored when selecting other core functions.

Gamma : 'RBF', 'poly' and 'sigmoid' of kernel function. The default is the 'auto', will be selected 1 / n_features

coef0 : the constant term kernel function. Useful for 'poly' and 'sigmoid'.

Probability : whether to use probability estimates? . The default is False

Shrinking : whether to adopt shrinking heuristic method, the default is true

Tol : stop training error value magnitude, defaults to 1e-3

cache_size : kernel cache buffer size, default is 200

class_weight : heavy weight category, the dictionary form of delivery. Provided several types of parameters C is weight * C (C-SVC in C)

verbose : allows redundant outputs?

max_iter : maximum number of iterations. -1 is unlimited.

decision_function_shape‘ovo’, ‘ovr’ or None, default=None3

random_state : seed value of data shuffling, int value

The main adjustment parameters are: C, kernel, degree, gamma, coef0.

For reference only, the correctness of the self-testing, it is best to read the official documentation.

Guess you like

Origin www.cnblogs.com/zrmw/p/11448228.html