Displaying 2 results from an estimated 2 matches for "rf_gridsearch".
2023 May 09
1
RandomForest tuning the parameters
...method="repeatedcv", number=10, repeats=3,
> search='grid')
> >
> > # Outline the grid of parameters
> > tunegrid <- expand.grid(.maxnodes=c(10,20,30,50), .ntree=c(100, 200,
> 300))
> > set.seed(seed)
> >
> > # Train the model
> > rf_gridsearch <- train(x=X_train_, y=y_train_, method=customRF,
> metric=metric, tuneGrid=tunegrid, trControl=control)
> >
> > plot(rf_gridsearch)
> >
> > rf_gridsearch$bestTune
> >
> > #################################################
> >
> > _______________...
2023 May 08
1
RandomForest tuning the parameters
...ion(x) x$classes
?
# Set grid search parameters
control <- trainControl(method="repeatedcv", number=10, repeats=3, search='grid')
?
# Outline the grid of parameters
tunegrid <- expand.grid(.maxnodes=c(10,20,30,50), .ntree=c(100, 200, 300))
set.seed(seed)
?
# Train the model
rf_gridsearch <- train(x=X_train_, y=y_train_, method=customRF, metric=metric, tuneGrid=tunegrid, trControl=control)
?
plot(rf_gridsearch)
rf_gridsearch$bestTune
#################################################