sklearn.utils.class_weight.compute_class_weight(class_weight, classes, y)
[source]
Estimate class weights for unbalanced datasets.
Parameters: |
|
---|---|
Returns: |
|
The “balanced” heuristic is inspired by Logistic Regression in Rare Events Data, King, Zen, 2001.
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.class_weight.compute_class_weight.html