Reputation: 25
SVM uses a distance measure in the algorithm, What is the default distance measurement used in sklearn SVM ?
Is it possible to change it ?
Upvotes: 0
Views: 252
Reputation: 1003
SVM is minimizing the [Hinge loss][1]. You cannot change the loss otherwise this is not an SVM anymore (e.g. log loss will give rise to logistic regression). However, you can make use of kernels via the kernel tricks (look a the kernel
parameters in sklearn.svm.SVC
)
If you want an estimator for which you can change the loss, you can use sklearn.linear_model.SGDClassifier
.
Upvotes: 1