Is there a direct cost-sensitive implementation of the SVM classifiers (CS-SVM) within the sklearn module? There are several ad hoc methods for the cost-sensitive SVM on "the market", but I am wondering whether there is a simple way to integrate a CS-SVM into a python pipeline.

# Solved – Cost-sensitive SVM with sklearn

loss-functionsskewnesssvm

## Best Answer

there's a

`class_weight`

parameter in sklearn's svm, you can put a dictionary that specifies the weights of different classes.there's an example page http://scikit-learn.org/stable/auto_examples/svm/plot_separating_hyperplane_unbalanced.html