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_dfReturns the instance variable data_df (tibble::tibble)
labelReturns the instance variable label (character)
seedReturns the instance variable seed (integer)
kReturns the instance variable k (integer)
repeatsReturns the instance variable repeats (integer)
gridReturns the instance variable grid (tibble::tibble)
scoresReturns the instance variable scores (tbl_df)
verboseReturns 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 )
objThe data to be analyzed. (tibble::tibble)
labelThe column name of the labels within obj (character)
gridA list comprising the hyperparameter variations. (list)
kThe corss validation parameter (integer)
repeatsThe repeat parameter (integer)
seedThe seed for the cross validation (integer)
verboseMakes 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")
scoreThe 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)
deepWhether 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.