是否有可能在XGBoost算法中指定叶片节点的最小重量分数?
我试图实现一种简单的XGBoost算法,并希望指定我的样品的最小重量分数,应在每个叶子节点中实现。到目前为止,我只找到了参数min_child_weight,该参数指定了节点中的最小样本数。我想知道我是否有一种方法可以在此处结合每个样品的重量,因为不是每个样本的重量= 1?
如果有人可以在这里提供帮助,我会非常高兴!谢谢:)
下面您可以找到我的代码:
xg_r = xg.XGBRegressor(objective="reg:squarederror", n_estimators = 10, max_depth = 5, min_child_weight = 500000)
xg_r.fit(X_train, y_train)
xg.plot_tree(xg_r)
I tried to implement a simple XGBoost algorithm and would like to specify a minimum weight fraction of my samples, that should be fulfilled in every leaf node. So far I only found the parameter min_child_weight, which specifies the minimum number of samples in a node. I would like to know if there is a way of how I can incorporate the weight of each sample here, since not each sample has weight=1?
I would be super glad if someone can help here! Thank you :)
Below you can find my code:
xg_r = xg.XGBRegressor(objective="reg:squarederror", n_estimators = 10, max_depth = 5, min_child_weight = 500000)
xg_r.fit(X_train, y_train)
xg.plot_tree(xg_r)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论