Closed hbaniecki closed 2 years ago
Solved using trControl = trainControl(classProbs = TRUE)
:
data(iris)
library(caret)
library(ranger)
model <- train(Species ~ ., data = iris, method = "ranger",
trControl = trainControl(classProbs = TRUE))
predict(model, iris)
predict(model, iris, type="prob")
I couldn't make it work.