jpmml / jpmml-lightgbm

Java library and command-line application for converting LightGBM models to PMML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to get categorical features map in pmml file while creating one from lightgbm model (v1.2)

arpitswami opened this issue · comments

Hi,

I am trying to create pmml file for lightgbm model of around 50 MB's and tried to create pmml file from it by using the command:

java -jar ~/Downloads/jpmml-lightgbm-executable-1.2.jar --lgbm-input ~/Downloads/lgb_model_301_2021101806 --pmml-output ~/Downloads/lgb_model_301_2021101806.pmml

With this, i am seeing that my pmml file is converting categorical features to integer values. I rechecked the binary model of lightgbm and it has categorical feature values in it. So while reading this created pmml in java code, i am getting null values for categorical features as i am passing string and its expecting integers.

can you please help to tell if i am missing any parameter in above command, or if pmml is doing some kind of optimisation to reduce size of final output.

~/Downloads/jpmml-lightgbm-executable-1.2.jar

Does this issue happen with the latest release version (1.3.12)?

No, it's was not facing it 1.3.12 release. But could I have done it with 1.2 version? as upgrading version would take an additional task to do it accross the system.

The 1.2.X development branch was effectively finalized two years ago (oct 2019). It will not be updated.

If you have the time & resources, you may merge the HEAD of the 1.3.X development branch into it, and then keep maintaining it locally.