2014-07-09 19:56 GMT+02:00 Manoj Kumar <manojkumarsivaraj...@gmail.com>:
> 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.

It's usually this, though. You just multiply the loss by the weight,
so with a weight >1, it's as if the sample had been repeated in the
training set. This is effectively oversampling/undersampling
implemented efficiently.

------------------------------------------------------------------------------
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