check_group_partitions {mikropml} | R Documentation |
Check the validity of the group_partitions list
Description
Check the validity of the group_partitions list
Usage
check_group_partitions(dataset, groups, group_partitions)
Arguments
dataset |
Data frame with an outcome variable and other columns as features. |
groups |
Vector of groups to keep together when splitting the data into
train and test sets. If the number of groups in the training set is larger
than |
group_partitions |
Specify how to assign |
Author(s)
Kelly Sovacool, sovacool@umich.edu
Examples
## Not run:
check_group_partitions(
otu_mini_bin,
sample(LETTERS[1:8],
size = nrow(otu_mini_bin),
replace = TRUE
),
list(train = c("A", "B"), test = c("C", "D"))
)
## End(Not run)