pyLightGBM
pyLightGBM copied to clipboard
Direct using of categorical features
LightGBM can use categorical feature directly.
There is a categorical_feature
parameter in LightGBM docs to deal with this behavior:
https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.md
It would be nice to add categorical feature support to pyLightGBM.
I can see from the regression example here that you integerise categorical features and then include these with continuous variables:
le = LabelEncoder()
for col in df.columns.tolist():
if 'cat' in col:
df[col] = le.fit_transform(df[col])
I agree it would be nice to add categorical feature support to pyLightGBM rather than training on mixed continuous and integerised categories (which doesn't make sense to me)