如何将Sparklyr(Spark ML)模型导出到PMML? [英] How to export sparklyr (Spark ML) models to PMML?

查看:155
本文介绍了如何将Sparklyr(Spark ML)模型导出到PMML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以使用JPMML-SparkML库将 Spark ML管道导出到 PMML .我只是在努力寻找如何使用 sparklyr R 做到这一点.

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.

我知道开放的github问题,提出了两个想法:

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

  • 使用Scala API,例如:

  • using Scala API, something like:

model <- ml_kmeans(<...>)    
sparkapi::invoke(model$.model, "toPMML", "./myModelPMML.xml")

  • 利用 https://github.com/jpmml/jpmml-converter https://github.com/jpmml/jpmml-sparkml

    但是,我找不到有关该提示的任何后续信息.有人尝试过这些解决方案吗?

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

    此处是与此问题相关的github问题.

    Here is the related github issue to this question.

    推荐答案

    您可以使用 sparklyr2pmml 包将Sparklyr/Apache Spark ML管道导出到PMML.

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

    这篇关于如何将Sparklyr(Spark ML)模型导出到PMML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆