I'm not that clued up about this specifically, but I'd think that using
the `class_weight` parameter for the svm classifier in sklearn should
achieve this.
Basically you can use this to penalize one class more than the other.
| class_weight : {dict, 'auto'}, optional
| Set the parameter C of class i to class_weight[i]*C for
| SVC. If not given, all classes are supposed to have
| weight one. The 'auto' mode uses the values of y to
| automatically adjust weights inversely proportional to
| class frequencies.
Can someone (please :) )confirm if I'm on the right track with this?
Hope this helps,
Jaques
2012/6/5 Emily Wong <[email protected]>
> Hi,
> I'm new to scikit and machine learning in general and I trying to use svm
> to find the best way to classify a dataset containing lots of negatives. I
> was wondering if there is a way to increase the penalty factor associated
> with misclassification of the positive class?
> Thanks,
> Emily
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general