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

[dask] test that Dask automatically treats 'category' columns as categorical features #3932

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

jameslamb
Copy link
Collaborator

Based on thread starting at #3930 (comment).

#3908 added some tests that the lightgbm.dask estimators correctly handled Dask DataFrames where some columns are pandas "category" columns. That PR used the parameter categorical_feature to explicitly provide a list of which features should be treated as categorical.

This is unnecessary, since auto is the default behavior and auto tells LightGBM "treat 'category' columns as categorical features" (

if categorical_feature == 'auto': # use cat cols from DataFrame
categorical_feature = cat_cols_not_ordered
).

This PR removes the unnecessary categorical_features parameter in tests. As of this PR, we'll now be testing not only that lightgbm.dask estimators correctly train on categorical features, but also that it also automatically

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

Nice!

@jameslamb
Copy link
Collaborator Author

Nice!

thanks for pointing it out!

@StrikerRUS StrikerRUS merged commit 18d5793 into microsoft:master Feb 9, 2021
@jameslamb jameslamb deleted the fix/categorical-feature branch February 9, 2021 23:07
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants