如何在决策树python中进行体重观察
我有一个数据集,其中包含不同数量的策略。 与较少日子的政策相比,运行更多天的政策必须具有更高的重量。 在Python的基于树的模型中,有什么方法可以做到这一点吗?特别是决策树模型。
每个政策都是1行。
谢谢,
I have a data set with policies that run for different numbers of days.
The policies that run for more days have to have higher weight compared to the policies that run for less days.
Is there a way that I can do that in tree based models in python? Especially, decision tree model.
Every policy is 1 row.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
sample_weight
fit()
功能的参数来加重训练样本。如下:
You can use the
sample_weight
argument of thefit()
function to weight your training samples.As follow: