scikit-learn/scikit-learn — pull request #3961 by trevorstephens (2014-12-12 01:23:51+00:00)
Title: [WIP] Add support for class_weight to the forests

This PR adds support for specifying `class_weight` in the forest classifier constructors.

- Right now it only supports single-output classification problems. It would be possible however to accept a list of dicts for each target (or just the preset string 'auto' overall), and multiply the expanded weight vectors such that a sample with two minority classes becomes even more important, etc. I couldn't find any precedent in other classifiers to guide this.
- Should an exception, warning or tantrum be thrown for an 'auto' `class_weight` used with the `warm_start` option?

Any other comments ?