sample_weight和min_samples_split在决策树中的相互作用
在sklearn.ensemble.randomforestclassifier中,如果我们同时定义sample_weight
和min_samples_split
,样品权重是否影响min_samples_split。例如,如果min_sample_split = 20,并且样本中的数据点的重量为2,则10个数据点满足min_sample_split
条件?
In sklearn.ensemble.RandomForestClassifier, if we define both sample_weight
and min_samples_split
, does the sample weight impact the min_samples_split. For example, if min_sample_split = 20 and the weight of data points in samples are all 2, then 10 data points satisfy the min_sample_split
condition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,请参见;
min_samples_split
不考虑样本权重。与min_samples_leaf
及其加权cousinmin_weight_fraction_leaf
( source )。您的示例建议一个简单的实验检查:
No, see the source;
min_samples_split
does not take into consideration sample weights. Compare tomin_samples_leaf
and its weighted cousinmin_weight_fraction_leaf
(source).Your example suggests an easy experiment to check: