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

Failed to load GBDT,requires three or more target categories

Xiaojinhua opened this issue · comments

Failed to load GBDT

java.lang.IllegalArgumentException: Multi-class classification requires three or more target categories
	at org.jpmml.lightgbm.MultinomialLogisticRegression.<init>(MultinomialLogisticRegression.java:42)
	at org.jpmml.lightgbm.GBDT.loadObjectiveFunction(GBDT.java:556)
	at org.jpmml.lightgbm.GBDT.load(GBDT.java:101)
	at org.jpmml.lightgbm.LightGBMUtil.loadGBDT(LightGBMUtil.java:52)
	at org.jpmml.lightgbm.LightGBMUtil.loadGBDT(LightGBMUtil.java:44)
	at org.jpmml.lightgbm.example.Main.run(Main.java:146)
	at org.jpmml.lightgbm.example.Main.main(Main.java:136)

Looks like a perfectly valid warning/error to me - your label type (binary) and the chosen LightGBM objective function (multiclass?) are in conflict.

Fix your Python(?) code. Nothing to do for me.