[英]How to deploy models in R to Watson Machine Learning?
我已經在 Watson Studio 的 Notebook 中使用 R 庫“原型”訓練了一個原型分析模型,我想將它部署到 IBM Cloud Watson Machine Learning 並使用該服務預測新數據點的 alpha 系數。
我知道通過創建 WML Python 客戶端在 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 模型作為“模型”資產部署到 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 筆記本安排筆記本“作業”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.