Can PMML models be read in R?
Unfortunately, it is not possible to import a model in PMML format in order to predict the classes of some instances using R.
The pmml package only allow you to train a model in R and then export it.
Load model in Scala/Java from pmml created in R
You're using a legacy JPMML library, which was discontinued 3+ years ago. Naturally, it doesn't support new PMML features (such as PMML 4.2 and 4.3 schemas) that have been added since then.
Simply upgrade to the JPMML-Evaluator library. As a bonus, your code will be much shorter and cleaner.
Change version of pmml XML file R
You should try out the r2pmml package, which can do everything that the legacy pmml package does, and then some more.
Otherwise, you'd need to download a previous version of the legacy pmml package, or manually change the XML namespace declaration of the returned XML file - there is no other way.
Can't export xgboost model to pmml format in R
Alternatively, if correctness and conversion speed matter to you, then you can use the R2PMML package for converting R language XGBoost models to PMML.
library("r2pmml")
r2pmml(bst, "xgboost.pmml", fmap = as.fmap(dev_samp[,1:2]), response_name = colnames(dev_samp)[3])
Be sure to use the latest R2PMML package version (direct install from GitHub repository). The CRAN version is currently a bit outdated (does not provide the as.fmap(..)
utility function).
Related Topics
Maintaining an Input/Output Log in R
Sending in Column Name to Ddply from Function
How to Set Axis Ranges in Ggplot2 When Using a Log Scale
How to Define the Version of a Package in R Install.Packages
In R: Joining Vector Elements by Row, Converting Vector Rows to Strings
Why Doesn't "+" Operate on Characters in R
How to Log an R Session to a File
Manually Colouring Plots with 'Scale_Fill_Manual' in Ggplot2 Not Working
How to Determine If a Character Vector Is a Valid Numeric or Integer Vector
Can Transparency Be Used with Postscript/Eps
Stargazer Left Align Latex Table Columns
Mgcv Gam() Error: Model Has More Coefficients Than Data
Plot Margins in Rmarkdown/Knitr
How to Use a Character as Attribute of a Function
Let Each Plot in Facet_Grid Have Its Own Y-Axis Value
Assign Names to Vector Entries Without Assigning the Vector a Variable Name