What does `sample_weight` do to the way a `DecisionTreeClassifier` works in sklearn?

前端 未结 2 1302
暖寄归人
暖寄归人 2020-12-01 03:42

I\'ve read from this documentation that :

\"Class balancing can be done by sampling an equal number of samples from each class, or preferably by normalizing the su

2条回答
  •  抹茶落季
    2020-12-01 04:11

    If anyone is just looking for the way to compute the sample_weight like I was, you might find this handy.

    sklearn.utils.class_weight.compute_sample_weight

提交回复
热议问题