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

how to transform a lightgbm model into a regression model #38

Closed xxyy001 closed 4 years ago

xxyy001 commented 4 years ago

Excuse me, how to transform a lightgbm model into a regression model

xxyy001 commented 4 years ago

{FieldName@3221} "_target" -> {ProbabilityDistribution@3266} "ProbabilityDistribution{result=0, probability_entries=[1=0.4350043361208059, 0=0.5649956638791941]}"

It is now a classification model after conversion

vruusmann commented 4 years ago

The JPMML-LightGBM library does not change model type during conversion (eg. from regression to classification).

If the converter is giving you a classification-type model in PMML, then it means that it was applied to a classification-type LightGBM model text file.

To obtain a regression-type model in LightGBM and PMML, simply use a regression-type objective function (eg. regression or regression_l1).