I have a PMML file which I am trying to import/read in R to do some analysis based on it. I couldn't find a suitable function to read the model, although I found a package that is related to PMML. Is there is a simple way to read this type of file into R?
Thanks,
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.
There is now a way to read PMML objects into R, using the great "partykit" package.
I tried it out with a node from SPSS and it works.
Here is the link to the vignette explaining how: https://cran.r-project.org/web/packages/partykit/vignettes/constparty.pdf
There is currently no way to import a model via PMML unless the model was created using the arules package. The authors of that package have provided a way to import/export arules models
Yes there is even a pmml package.
And see the Rdocumentation.org result for searching for pmml
来源:https://stackoverflow.com/questions/19718468/can-pmml-models-be-read-in-r