Hi,

As fas as I have worked with sklearn, and as I have been told, it works
this way.

Intuitively, a sample with higher weight, should be predicted more
accurately and hence contribute more to the loss. Hence we just multiply,
the sample weight of each term to its loss.

For example, in the least square method.

for a sample the loss, is ( y - W'X)**2

the weighted loss would be (weight * (y - W'X) ** 2) and hence
((sqrt(weight) * y - sqrt(weight) * W'X) ** 2)

where weight is for that particular sample or sample weight.

For other models, this simplification might not be so straightforward.




On Wed, Jul 9, 2014 at 5:04 PM, Mohamed-Rafik Bouguelia <
bouguelia.med.ra...@gmail.com> wrote:

> Hello,
>
> I see that with the classifiers available on sklearn (or most of them)
> there is sample_weight option that allows us to associate weights to the
> training samples, but there is no reference to show how these classifiers
> are modified to handle sample weighting.
>
> Do you have references to papers that explain how to handle "sample
> weights" for the different classifiers ?
>
> Thanks,
> Best regards,
>
> Rafik.
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>


-- 
Regards,
Manoj Kumar,
GSoC 2014, Scikit-learn
Mech Undergrad
http://manojbits.wordpress.com
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to