How to export sparklyr (Spark ML) models to PMML?

旧巷老猫 提交于 2019-12-25 09:30:32

问题


I know that Spark ML pipelines can be exported to PMML using the JPMML-SparkML library. I am just struggling to find out how I could do it from R using sparklyr.

I am aware of open github issue, where two ideas were raised:

  • using Scala API, something like:

    model <- ml_kmeans(<...>)    
    sparkapi::invoke(model$.model, "toPMML", "./myModelPMML.xml")
    
  • leverage https://github.com/jpmml/jpmml-converter and the https://github.com/jpmml/jpmml-sparkml

However I could not find any follow ups on that tips. Has anyone tried any of these solutions?

Here is the related github issue to this question.


回答1:


You can use the sparklyr2pmml package to export Sparklyr/Apache Spark ML pipelines to PMML.



来源:https://stackoverflow.com/questions/44702031/how-to-export-sparklyr-spark-ml-models-to-pmml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!