Question

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,

Was it helpful?

Solution

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.

OTHER TIPS

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

http://cran.r-project.org/web/packages/arules/index.html

Although it's a long time ago, I still want to share that you can use the "reticulate" to call the python pypmml package to implement your ideas in R, and in order to be more friendly and make the prediction look more like the predict function in R, I will It is encapsulated, the address of the package is here "https://github.com/xianglinZ/RLoadPmml"

Yes there is even a pmml package.

And see the Rdocumentation.org result for searching for pmml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top