Description Format Details Active bindings Methods Author(s) Examples
A cross validation grid search for hyperparameters of the CART tree.
[R6::R6Class] object.
Some mor details will follow
data_df
Returns the instance variable data_df (tibble::tibble)
label
Returns the instance variable label (character)
seed
Returns the instance variable seed (integer)
k
Returns the instance variable k (integer)
repeats
Returns the instance variable repeats (integer)
grid
Returns the instance variable grid (tibble::tibble)
scores
Returns the instance variable scores (tbl_df)
verbose
Returns the instance variable verbose (logical)
new()
Creates and returns a new gridSearchCV.rpart object.
gridSearchCV.rpart$new( obj = "tbl_df", label = "character", grid = "list", k = 10, repeats = 1, seed = 42, verbose = FALSE )
obj
The data to be analyzed. (tibble::tibble)
label
The column name of the labels within obj (character)
grid
A list comprising the hyperparameter variations. (list)
k
The corss validation parameter (integer)
repeats
The repeat parameter (integer)
seed
The seed for the cross validation (integer)
verbose
Makes the class print results (logical)
A new gridSearchCV.rpart object. (pguXAI::gridSearchCV.rpart)
finalize()
Clears the heap and indicates that instance of gridSearchCV.rpart is removed from heap.
gridSearchCV.rpart$finalize()
print()
Prints instance variables of a gridSearchCV.rpart object.
gridSearchCV.rpart$print()
string
calc_model_scores()
creates a crossVal.rpart model and returns its scores
gridSearchCV.rpart$calc_model_scores(...)
...
The ctrl parameter of the model.
train()
runs the grid search
gridSearchCV.rpart$train()
best_model_parameter()
Returns the parameters of the best model
gridSearchCV.rpart$best_model_parameter(score = "character")
score
The score parameter by which the optimum is defined (character)
clone()
The objects of this class are cloneable with this method.
gridSearchCV.rpart$clone(deep = FALSE)
deep
Whether to make a deep clone.
Sebastian Malkusch, malkusch@med.uni-frankfurt.de
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.