split_data | R Documentation |
this function provides a split dataset to be used by the cross_validation function.
split_data(stratified_data, holdout_fraction, nfolds)
stratified_data |
dataframe of the stratified data returned by the stratify_by function |
holdout_fraction |
fraction of data that will be heldout for training the model, if using split_data for holdout |
nfolds |
number of folds in the data if using split_data for cross validation |
simulate_data(number_of_participants=10, covariance_matrix=diag(2), outcome_column=1, means=c(0,0))
randomized_data <- randomize(data=data, seed = 7)
stratified_data <- stratify_data(randomized_data=randomized_data,groups=groups)
train_and_test <- split_data(stratified_data=stratified_data,holdout_fraction=0.8)
folded_data <- split_data(stratified_data=train_and_test$training_dataset,nfolds=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.