I have a dataset "df_train" that contains all my explanatory variables and my target variable (xxx1). Furthermore, I have another dataset that contains the weights to use when fitting Random Forest (xxx2 column). I am trying to implement 3-fold cv but it seems that something is wrong. It says about class probabilities but I am trying to fit a regression random forest. I did not understand what the rest of the errors are about for.
train_control<- trainControl(method="cv", number=3, savePredictions = TRUE)
model2<- caret::train(xxx1~., data=df_train, trControl=train_control,
weights = train$xxx2, method="ranger",
ntree = 64)
Something is wrong; all the RMSE metric values are missing:
RMSE Rsquared MAE
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :6 NA's :6 NA's :6
Error: Stopping
In addition: There were 20 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In train.default(x, y, weights = w, ...) :
cannnot compute class probabilities for regression
2: model fit failed for Fold1: mtry= 2, min.node.size=5, splitrule=variance Error in ranger::ranger(dependent.variable.name = ".outcome", data = x, :
unused argument (ntree = 64)
3: model fit failed for Fold1: mtry=32, min.node.size=5, splitrule=variance Error in ranger::ranger(dependent.variable.name = ".outcome", data = x, :
unused argument (ntree = 64)
4: .....