I have many models, like:
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))
}
I need to put these models inside power bi, for to run the predict function of R in power bi, But power bi doesn't accept list.
I was unsuccessful with the solution: https://towardsdatascience.com/how-to-predict-values-from-a-custom-r-model-in-power-bi-3364f83b0015