decision tree error
Closed this issue · 4 comments
Hello,
I am trying to use the decision tree model on my data but am encountering an error. Though I was successfully able to run it with random forest.
The code I have run is:
results_dt <- run_ml(pp$dat_transformed,
'rpart2',
cv_times = 5,
seed = 2019)
And the error I am getting is:
model fit failed for Fold5.Rep5: maxdepth=30 Error in [.data.frame
(m, labs) : undefined columns selected
caret::train()
issued the following warning:
simpleWarning in nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo, : There were missing values in resampled performance measures.
This warning usually means that the model didn't converge in some cross-validation folds because it is predicting something close to a constant. As a result, certain performance metrics can't be calculated. This suggests that some of the hyperparameters chosen are doing very poorly.Something is wrong; all the AUC metric values are missing
Thank you.
I was able to reproduce this error with @ebectold's data, I'm not sure how to solve this. Any ideas @kelly-sovacool or @zenalapp?
This suggests that some of the hyperparameters chosen are doing very poorly.
As the warning message states, the most likely cause is that the default hyperparameters are not great for your dataset. Try changing the hyperparameter values. You can read about that in the vignette Hyperparameter Tuning. For decision tree models, you'll want to tune maxdepth
.
Hi @ebechtold, have you been able to resolve this for your dataset by trying different maxdepth
values?
I am closing this as most likely this is a problem with this specific dataset requiring better chosen hyperparameters. We can re-open if that is not the case.