-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set min_child_weight as a float instead of int #5976
Comments
sklearn's min_samples_leaf supports float as a percentage of total sample size which makes sense to me. It would be great if xgboost supports similar functionality. |
Sorry for the mistake in our doc. Also, the parameter you referred |
Hi @trivialfis , thanks so much for your timely reply. May I double check with you that if min_child_weight is set as, for example, 0.01, it will be treated as n_sample * 0.01, meaning 1% of total sample? |
No. It's the minimum value of accumulated Hessian for each leaf. Hessian is often used as a proxy for data in gradient boosting. |
I see. Thanks for answering. |
Hi, all
Based on xgboost documentation, min_child_weight is treated as number of observation for rmse objective and is usually chosen as int such as https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.XGBRegressor.
However, I recently read a article saying that "With XGBoost, you can specify this parameter as a float as well. If you do, it will use a percentage of samples to determine leaf nods." (https://kevinvecmanis.io/machine%20learning/hyperparameter%20tuning/dataviz/python/2019/05/11/XGBoost-Tuning-Visual-Guide.html#child_weight). I cannot find a second source using min_child_weight as a float.
So I am confused and worried that is it true that we could set min_child_weight as a float?? Any comfirmation would be appreciated.
The text was updated successfully, but these errors were encountered: