There is a newer version of the record available.

Published October 24, 2021 | Version v2.0.0

LudvigOlsen/groupdata2: groupdata 2.0.0

Authors/Creators

Description

Summary

This version introduces collapse_groups() and friends, as well as summarize_balances() and ranked_balances(). It also improves numerical balancing in fold() which breaks reproducibility.

Changes

  • Breaking: The numerical balancing (num_col) in fold() gets multiple improvements. This breaks reproducibility in some contexts.

    • Fixes bug with selection of groups to redistribute when extreme_pairing_levels > 1. The groupings were likely to be fine, but the fix should give better groupings on average.

    • When possible, it redistributes the smallest and/or largest group if they are 1 standard deviation from the second smallest/largest group to avoid imbalances due to very small/large scores.

    • Adds use of extreme triplet grouping when too few grouping columns are created with extreme pairing. This can lead to an increase in the number of created fold columns. In some cases, these groupings may be more balanced than with extreme pairing, but on average extreme pairing leads to more balanced groupings. See rearrr::triplet_extremes() for more on extreme triplet grouping.

    • Adds argument use_of_triplets in fold() to allow using extreme triplet grouping instead of extreme pairing or disabling it completely.

  • Adds collapse_groups() for collapsing a set of existing groups into a smaller set of groups. Can balance the new groups by size and by numeric, categorical and ID columns. The more of these you balance at a time, the less balanced each will tend to be. Compare settings by summarizing the balances with summarize_balances() afterwards. For creating the most balanced groups, enable auto_tune.

  • Adds collapse_groups_by_size(), collapse_groups_by_numeric(), collapse_groups_by_levels(), and collapse_groups_by_ids(). These are wrappers of collapse_groups() for a simplified interface.

  • Adds summarize_balances() for inspecting the balance of numeric, categorical, and ID columns in-and-between groups.

  • Adds ranked_balances() for extracting the across-group standard deviations of balances from the output of summarize_balances(). The standard deviations are a measure of how balanced a split is.

  • Adds "every" method to grouping functions. Groups every n data points together.

  • Prepares package's tests for checkmate 2.1.0.

Files

LudvigOlsen/groupdata2-v2.0.0.zip

Files (400.9 kB)

Name Size Download all
md5:7204e6fdc32c93e15e48fb04f8dbdca9
400.9 kB Preview Download

Additional details

Related works