jpmml / jpmml-lightgbm

Java library and command-line application for converting LightGBM models to PMML
GNU Affero General Public License v3.0
174 stars 58 forks source link

Support for pipeline #15

Closed bbzzzz closed 6 years ago

bbzzzz commented 6 years ago

Hi Vilu,

Does this package support pipeline like sklearn2pmml?

Thanks, Bohan

vruusmann commented 6 years ago

AFAIK, the LightGBM framework only deals with models, and does not define its own pipeline concept/formalization.

All JPMML conversion libraries have "pluggable" architecture - you can do feature engineering using pipelines in one ML framework, and then train the model using some other ML framework. For example, putting JPMML-SkLearn and JPMML-LightGBM libraries together:

Standard Scikit-Learn pipeline: https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/resources/main.py#L121-L155 https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/resources/main.py#L162

Non-standard, LightGBM-style categorical feature encoding pipeline: https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/resources/main.py#L177-L194 https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/resources/main.py#L196