Skip to content
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

[Feature Proposal]: Flexibility to set custom Min Child Weight Values for each feature #10670

Open
kiran-vj opened this issue Aug 1, 2024 · 4 comments

Comments

@kiran-vj
Copy link

kiran-vj commented Aug 1, 2024

In practical modelling scenarios there are often some very key variables which are very sparsely populated- which forces the modelers to set lower min_child_weight values to ensure these variables are incorporated in the model, but this can often lead to overfitting on other variables.

To avoid such scenarios what we propose is having the flexibility to set different min_child_weight values for each feature.

@trivialfis
Copy link
Member

trivialfis commented Aug 1, 2024

Out of curiosity, how do you tune such models? I imagine the HPO search space would be extremely large?

@kiran-vj
Copy link
Author

You're right, the HPO search space would be large. But we can approach it as a 2-step process. In the first step the HPO search would be limited to Uniform MCW for all the features, and in the second step we try to tune just the MCW parameter only for the problematic features identified by the modellers.

@trivialfis We wish to contribute this feature by helping in the development. What would the process look like for getting this approved and merged into XGBoost?

@kiran-vj
Copy link
Author

Any thoughts on this?

@trivialfis
Copy link
Member

Apologies for the slow reply. It's not a trivial change.
You can find the parameter definition here:

struct TrainParam : public XGBoostParameter<TrainParam> {

If you turn it into a vector, it can be parsed as JSON similar to
void ParseInteractionConstraint(

By searching the parameter name, you can find where it's used to prevent split. The split candidate has split feature index. I'm not entirely sure about the GPU implementation yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants