Description Format Details Active bindings Methods Author(s) Examples
A Cross Validation for the CART tree.
[R6::R6Class] object.
Some mor details will follow
df_dataReturns the instance variable df_data (tibble::tibble)
labelReturns the instance variable label (character)
seedReturns the instance variable seed (integer)
lvlsReturns the instance variable lvls (character)
kReturns the instance variable k (integer)
ctrlReturns the instance variable ctrl (rpart::rpart.control)
auc_rocReturns the instance variable auc_roc (numeric)
confusion_matrixReturns the instance variable confucion_matrix
scoresReturns the cross validation scores (tibble::tibble)
accuracyReturns the corss validation accuracy (numeric)
verboseReturns the corss validation verbose (logical)
new()Creates and returns a new crossVal.rpart object.
crossVal.rpart$new( obj = "tbl_df", label = "character", ctrl = "rpart::rpart.control", k = 10, seed = 42, verbose = FALSE )
objThe data to be analyzed. (tibble::tibble)
labelThe column name of the labels within obj (character)
ctrlThe control sequence for the CART tree (rpart::rpart.control)
kThe corss validation parameter (integer)
seedThe seed for the cross validation (integer)
verboseMakes the class print results (logical)
A new crossVal.rpart object. (pguXAI::crossVal.rpart)
train()trains the model
crossVal.rpart$train(repeats = 1)
repeatsThe repeat parameter (integer)
finalize()Clears the heap and indicates that instance of crossVal.rpart is removed from heap.
crossVal.rpart$finalize()
print()Prints instance variables of a crossVal.rpart object.
crossVal.rpart$print()
string
plot()Plots the confusion matrix of the cross validation
crossVal.rpart$plot()
clone()The objects of this class are cloneable with this method.
crossVal.rpart$clone(deep = FALSE)
deepWhether to make a deep clone.
Sebastian Malkusch, malkusch@med.uni-frankfurt.de
1 2 3 4 5 | data("iris")
df_data = tibble::as_tibble(iris)
ctrl <- rpart::rpart.control(minsplit = 3, maxdepth = 3)
cv <- pguXAI::crossVal.rpart$new(obj = df_data, label = "Species", ctrl = ctrl, k = 10)
plot(cv)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.