The function I’m most appreciative of is collapse_groups() which allows you to divide already grouped data into another set of groups whilst retaining the original.
Super handy when working with kfold CV and you want to split your data but there are structural elements you don’t want shared across groups, to prevent inflation of predictive abilities.
https://github.com/ludvigolsen/groupdata2
#MachineLearning #GenomicSelection
GitHub - LudvigOlsen/groupdata2: R-package: Methods for dividing data into groups. Create balanced partitions and cross-validation folds. Perform time series windowing and general grouping and splitting of data. Balance existing groups with up- and downsampling or collapse them to fewer groups.
R-package: Methods for dividing data into groups. Create balanced partitions and cross-validation folds. Perform time series windowing and general grouping and splitting of data. Balance existing g...

