alteryx / alteryx/evalml

Use enable_categorical flag in XGBClassifier to avoid encoding categorical features

Open
#3,988 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
850
Forks
96
PR merge metrics
No merged PRs in 30d

Description

- With XGBoost 1.5.0, you can now use `enable_categorical` argument to pass categorical data (which avoids us needing to one-hot encode categorical columns)
- https://xgboost.readthedocs.io/en/stable/python/examples/categorical.html#sphx-glr-python-examples-categorical-py

```python
import xgboost as xgb

clf = xgb.XGBClassifier(
enable_categorical=True, max_cat_to_onehot=1
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.