holdout | R Documentation |
this function is used to holdout input data from being trained on the model
holdout(
file_path = file_path,
seed = seed,
groups = groups,
holdout_fraction = holdout_fraction
)
file_path |
path to the input dataframe |
seed |
initialize a random number generator with a specific seed value |
groups |
information on how the stratified data will be grouped (name of column, index of column, vector) |
holdout_fraction |
fraction of data that will be heldout for training the model |
number_of_participants <- 10
covariance_matrix <- diag(2)
outcome_column <- 1
means <- c(0,0)
seed <- set.seed(7)
groups <- rep(1:2, each = 5) #information on how the stratified data will be grouped
holdout_fraction <- 0.8
data <- simulate_data(number_of_participants,covariance_matrix,outcome_column,means)
randomized_data <- randomize(data=data,seed=seed)
stratified_data <- stratify_data(randomized_data=randomized_data, groups=groups)
train_and_test <- split_data(stratified_data=stratified_data, holdout_fraction=holdout_fraction)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.