Closed fwendler closed 3 years ago
What's your relevant sessionInfo()
?
My session info is as follows, and the sample script that you provided works without errors:
R version 3.3.1 (2016-06-21)
other attached packages:
[1] r2pmml_0.24.2 xgboost_1.1.0.1
Also works with R version 3.5.2.
I don't have R version 4 installed at the moment.
Wow, you are fast 🥇 I‘m using R 4.0.3 and xgboost_1.2.0.1, r2pmml_0.25.0
OK. Looks like I'd need to upgrade to R version 4.0.X then, and re-run the experiment.
If you have a functioning R version 3.X installation laying around, then you may test if the sample script succeeds there.
I'm running R version 4.0.3 now (with latest XGBoost and R2PMML packages), and I'm seeing the same error now.
Explanation of the error - the converter expects that feature map columns are factors, but it's getting characters.
The quick workaround would be to correct feature map column types manually:
iris.fmap = as.fmap(iris.matrix)
iris.fmap$name = as.factor(iris.fmap$name)
iris.fmap$type = as.factor(iris.fmap$type)
Looks like a breaking change between R version 3 and 4 platforms.
The correct fix would be to make the converter accept both column types.
Fantastic, thank you very much for the super fast response and workaround!
In the meantime I was able to confirm that it works with R 3.6.3 (with the same versions of xgboost and r2pmml that I mentioned above).
First of all thank you for this great library!
I have problems exporting xgboost models which also occurs in the example from the readme: