Relative Content

Tag Archive for lightgbm

Passing categorical features to LightGBM in C API

I use Java wrapper of LightGBM C API to make predictions. Namely, methods LGBM_BoosterPredictForMatSingleRowFastInit and LGBM_BoosterPredictForMatSingleRowFast. The method LGBM_BoosterPredictForMatSingleRowFast accepts const void *data as a pointer to some structure with data. What is this structure? I don’t see a description of it in the documentation. In python categorical feature is represented as int. How is it represented in C? I tried different options, but none of them worked as expected.