Hello, is there a way to pass in categorical featu...
# mlforecast
Hello, is there a way to pass in categorical features to LightGBM through
? I could be way off, but it seems like using
does label encoding but then these are treated as numeric features in the model itself (or maybe that is by design?). Also, trying to specify the cat indexes in the constructor for LGBMRegression provides the following:
Copy code
UserWarning: categorical_feature keyword has been found in `params` and will be ignored.
Please use categorical_feature argument of the Dataset constructor to pass this parameter.
Hey. You can compute the features with preprocess, manually train the model and then use it to compute predictions like here or you could also leverage the fact that lightgbm automatically uses columns with categorical data type as categorical features using a pipeline like here.
Perfect, thank you!