【问题标题】:How to deploy models in R to Watson Machine Learning?如何将 R 中的模型部署到 Watson Machine Learning?
【发布时间】:2019-11-16 07:09:20
【问题描述】:

我在 Watson Studio 的 Notebook 中使用 R 库“原型”训练了一个原型分析模型,我想将其部署到 IBM Cloud Watson Machine Learning 并使用该服务预测新数据点的 alpha 系数。

我知道在 python 中通过创建 WML Python 客户端来做到这一点。是否有等效的 Watson Machine Learning R 客户端?

#Archetypal analysis example
library("archetypes")
data("skel")
skel2 <- subset(skel, select = -Gender)
set.seed(8376)

train_ind <- sample(seq_len(nrow(skel2)), size = 450)
skel_t <- skel2[train_ind, ]
new_data <- skel2[train_ind, ]

as <- stepArchetypes(skel_t, k=1:12, verbose = FALSE, nrep=5)
a3 <- bestModel(as[[3]]) #select the model with 3 archetypes
alpha_pred <- predict(object = a3, newdata = new_data) #predicted alpha for new data

【问题讨论】:

    标签: r jupyter-notebook ibm-cloud watson-studio watson-ml


    【解决方案1】:

    将 R 模型作为“模型”资产部署到 Watson Machine Learning 的最简单方法是首先将它们转换为 PMML。

    这里是支持的 PMML 版本列表:https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/pm_service_supported_frameworks.html

    您可以在此处查看将 PMML 与 python 一起用于模型的示例:https://dataplatform.cloud.ibm.com/exchange/public/entry/view/b3b7b20fa84b8f8e6569064302df339f

    不过,您在该平台内还有其他解决方法,例如为您的 R 笔记本安排笔记本“作业”。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-20
    • 2019-07-07
    • 2020-12-16
    • 2022-12-01
    相关资源
    最近更新 更多