nrcv_rusranger | R Documentation |
Run a grid search in a nested cross validation.
nrcv_rusranger( x, y, searchspace, nouterfolds = 5, ninnerfolds = 5, nrepcv = 2, ... )
x |
|
y |
|
searchspace |
|
nouterfolds |
|
ninnerfolds |
|
nrepcv |
|
... |
further arguments passed to |
list
, with an element per nouterfolds
containing the following
subelements:
model selected ranger
model.
indextrain index of the used training items.
indextest index of the used test items.
prediction predictions results.
truth original labels/classes.
performance resulting performance (AUC).
selectedparams select hyperparameters.
gridsearch data.frame
, results of the grid search.
nouterfolds integer(1)
.
ninnerfolds integer(1)
.
nrepcv integer(1)
.
The reported performance could slightly differ from the median performance
in the reported gridsearch. After the gridsearch rusranger
is trained again
with the best hyperparameters which results in a new subsampling.
set.seed(20220324) iris <- subset(iris, Species != "setosa") searchspace <- expand.grid( mtry = c(2, 3), num.trees = c(500, 1000) ) ## n(outer|inner) folds and nrepcv are too low for real world applications, ## and are just used for demonstration and to keep the run time of the examples ## low nrcv_rusranger( iris[-5], as.numeric(iris$Species == "versicolor"), searchspace = searchspace, nouterfolds = 3, ninnerfolds = 3, nrepcv = 1 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.