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

Try out categorical mode with xgboost #3817

Closed
marco-c opened this issue Nov 13, 2023 · 5 comments
Closed

Try out categorical mode with xgboost #3817

marco-c opened this issue Nov 13, 2023 · 5 comments

Comments

@marco-c
Copy link
Collaborator

marco-c commented Nov 13, 2023

See https://xgboost.readthedocs.io/en/stable/tutorials/categorical.html.

@gothwalritu
Copy link
Contributor

Hello marco-c! I am interested in this issue. Could you please share more details on this?

@marco-c
Copy link
Collaborator Author

marco-c commented Jan 3, 2024

@gothwalritu it might be nice to continue with #3717 since it looks like you're close to completion.

If you want to explore this too, you could pick one of the models already implemented in bugbug/models, and try to use the https://xgboost.readthedocs.io/en/stable/tutorials/categorical.html.
You'd need to convert the categorical features to actually be categorical by doing .astype("category"), and then enable the functionality by passing enable_categorical=True to the XGBoost classifier constructor.

You can convert features to categorical in

class BugExtractor(BaseEstimator, TransformerMixin):
. We need to find a nice way to do it, but for testing you could just do it column by column on the dataframe here
return pd.DataFrame(apply_transform(bug) for bug in bugs_iter)
.

@gothwalritu
Copy link
Contributor

Yes, I will close #3717 first. I just wanted to get myself acquainted with this one in the meantime. Thanks for your reply. BTW Happy New Year!!

@marco-c
Copy link
Collaborator Author

marco-c commented Jan 4, 2024

@gothwalritu happy new year to you too!

@suhaibmujahid
Copy link
Member

suhaibmujahid commented Jan 5, 2024

Duplicate of #2819

@suhaibmujahid suhaibmujahid closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
@suhaibmujahid suhaibmujahid marked this as a duplicate of #2819 Jan 5, 2024
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

No branches or pull requests

3 participants