1
I trained several models in the R, like these:
iris2 <- data.frame(zzz= sample(c(0, 1),size = length(iris$Sepal.Length), replace = TRUE), iris)
for (i in unique(iris$Species)) {
saveRDS(glm(zzz ~ Sepal.Length+Sepal.Width+Petal.Length+Petal.Width, data = iris2[iris2$Species == i,]),
file = paste0("model_", i))
}
Now I need to put these RDS in Power BI to perform the predict()
in a script within PB, however PB does not accept lists.
I was unsuccessful with the solution: https://towardsdatascience.com/how-to-predict-values-from-a-custom-r-model-in-power-bi-3364f83b0015