jpmml / r2pmml

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

regression xgboost model to pmml #18

Closed LeZhengThu closed 7 years ago

LeZhengThu commented 7 years ago

hello, I'm trying to convert a regression xgboost model to pmml format so there's no response_name or response_level in my model. Say the model is 'xgb', I use r2pmml(xgb, "input_ehr.pmml") and there comes out an error like this:

Error in shQuote(pmml_output) : 
argument "file" is missing, with no default

Can you help me with it? Thanks.

LeZhengThu commented 7 years ago

Hi, I got another error: java.lang.ClassCastException: org.jpmml.rexp.RDoubleVector cannot be cast to org.jpmml.rexp.RIntegerVector. Is this a fmap problem? What does the type variable mean in fmap? Thanks.

vruusmann commented 7 years ago

I use r2pmml(xgb, "input_ehr.pmml")

The function r2pmml.xgb.Booster takes three positional arguments - x, fmap and file. You're only providing two of them.