jpmml / r2pmml

R library for converting R models to PMML
GNU Affero General Public License v3.0
73 stars 18 forks source link

Conversion fails for xgboost with reg:gamma #51

Closed VaradDaniel closed 5 years ago

VaradDaniel commented 5 years ago

Conversion fails when I try to build and export xgboost with objective as reg:gamma.

xgb_ex <- xgb.train(params = list(booster = "gbtree", objective = "reg:gamma"), data = data.DMatrix, nround = 50)

r2pmml(xgb_ex, "check_sev.pmml", fmap = data.fmap)

But the same code works if I change the objective to reg:linear, retrain and export. Everything else being equal.

I am not pasting the entire log, but the point at which the error starts I think is : Nov 06, 2018 3:30:37 PM org.jpmml.rexp.Main run SEVERE: Failed to convert java.lang.IllegalArgumentException: reg:gamma

I am using an older version of the r2pmml package, 0.13.1.

vruusmann commented 5 years ago

I am using an older version of the r2pmml package, 0.13.1.

Please let's not open issues about historic r2pmml package versions!

The reg:gamma objective function is supported in the latest version, hence this issue is invalid.