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
[R-package] ensure use of interaction_constraints does not lead to features being ignored #6377
base: master
Are you sure you want to change the base?
Conversation
Getting a failing unit test:
I will have a look at it next week (afk). |
The test used incomplete interaction constraints. Since the new functionality will add missing features to the list of interaction constraint vectors, the test failed. Now, the test uses completely specified constraints.
… are added as own group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left a few minor comments.
@
me if you need help with the failing tests. Let's also please get confirmation that excluding omitted features from training wasn't intentional (#6376 (comment)).
Co-authored-by: James Lamb <[email protected]>
Hey @mayer79 , across your recent PRs I've seen multiple "fix linting" types of commits. Totally fine to keep using Continuous Integration to get that feedback (we don't have a lot of activity going on in the repo right now), but you'd probably find it faster to run the linting locally. It only requires R and the Rscript .ci/lint_r_code.R $(pwd)/R-package |
Thanks, this is the stuff that I should have asked long time ago, but never did :-). |
Pipeline seems happy @jameslamb - but really no pressure :-) |
This enhances the R-API of interaction constraints by adding a feature group with those features that do not appear in any of the interaction groups. Currently, these are simply dropped from training, which seems undesirable.
Additionally, it reorganizes the code of the corresponding helper function
.check_interaction_constraints()
.It solves the R-package part of #6376. I will attempt a separate PR for the Python-package.
Example
Without the PR, the result is
i.e., the last two features are silently dropped from the training.