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

[R] Remove enable_categorical as parameter #10018

Merged
merged 1 commit into from Jan 30, 2024

Conversation

david-cortes
Copy link
Contributor

ref #9810

The Python DMatrix class introduced a parameter enable_categorical which needs to be manually changed from its default value in order to auto-detect categorical features in data frames.

From earlier comments, I understand the idea behind this parameter was to ensure backwards compatibility with processing of data frames in previous versions of xgboost for python, which used to be accepted but with all columns taken as numerical.

In R, there hasn't been any release of xgboost where data frames would have been accepted by DMatrix constructors, so there is no historical compatibility issue that would call for having this parameter.

This PR removes it, making categorical column detection always trigger for data frames. Note that the user can still override it by manually passing feature_types, just like in the python interface.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@trivialfis trivialfis merged commit df7cf74 into dmlc:master Jan 30, 2024
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants