一,parameters: decision_function_shape:
两种方法one v one 或者 one v rest
decision_function_shape : ‘ovo’, ‘ovr’ or None, default=None Whether
to return a one-vs-rest (‘ovr’) decision function of shape (n_samples,
n_classes) as all other classifiers, or the original one-vs-one
(‘ovo’) decision function of libsvm which has shape (n_samples,
n_classes * (n_classes - 1) / 2). The default of None will currently
behave as ‘ovo’ for backward compatibility and raise a deprecation
warning, but will change ‘ovr’ in 0.19. New in version 0.17:
decision_function_shape=’ovr’ is recommended. Changed in version 0.17:
Deprecated decision_function_shape=’ovo’ and None.
二、Attributes:
support_: 返回training data中的support vector的索引(几乎没什么用,因为索引是按大小顺序排列,不知道其属于哪个类别的support vector)
support_vectors_ :返回support_vector的值,而且按照每个类别的support_vect