0

I have trained an archetypal analysis model using the R library "archetypes" in a Notebook in Watson Studio and I want to deploy it to IBM Cloud Watson Machine Learning and predict the alpha coefficients for new data points using the service.

I know to do it in python by creating a WML Python Client. Is there an equivalent Watson Machine Learning R client?

#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
Sumit Goyal
  • 575
  • 3
  • 16

1 Answers1

0

The easiest way to deploy R models as "model" asset to Watson Machine Learning is by converting them to PMML first.

and here is the list of PMML versions that are supported: https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/pm_service_supported_frameworks.html

You can see an example of using PMML with python for a model here: https://dataplatform.cloud.ibm.com/exchange/public/entry/view/b3b7b20fa84b8f8e6569064302df339f

There are other workarounds within that platform you have, though, like scheduling Notebook "jobs" for your R notebooks.

  • do you by chance have the contents of https://dataplatform.cloud.ibm.com/exchange/public/entry/view/b3b7b20fa84b8f8e6569064302df339f it doesn't render anymore – Romeo Kienzler May 12 '21 at 16:13