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) infold()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_tripletsinfold()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 withsummarize_balances()afterwards. For creating the most balanced groups, enableauto_tune.Adds
collapse_groups_by_size(),collapse_groups_by_numeric(),collapse_groups_by_levels(), andcollapse_groups_by_ids(). These are wrappers ofcollapse_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 ofsummarize_balances(). The standard deviations are a measure of how balanced a split is.Adds
"every"method to grouping functions. Groups everyndata 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
- Is supplement to
- https://github.com/LudvigOlsen/groupdata2/tree/v2.0.0 (URL)