Repository navigation
feat(pooling): report AIC weights per partition and fit each subset once - #51
Merged
Merged
Conversation
group_datasets(method = "exhaustive") attaches a "partitions" attribute with one row per set partition: min_p_value, all_groups_poolable, delta_aic, aic_weight and selected. AIC weights are a diagnostic; the likelihood-ratio selection rule is unchanged. Pooling now fits each distinct subset of datasets once per call and reuses it across pairwise tests, the partition search and poolability_combinations(). On the six Cryptosporidium studies the exhaustive search drops from 60.6 s to 6.1 s (788 -> 126 fits); all outputs are identical to the previous build. Convergence warnings now fire once per distinct subset rather than per refit. Set partitions come from partitions::setparts() instead of a hand-rolled recursion, in the same order, so tie-breaks are unchanged. Closes #39. Refs #49.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
poolability_combinations()all reuse those fits. Closes Speed up group_datasets() exhaustive search (cache fits) and the app's exploration #39.partitions::setparts()(new Imports) instead of a hand-rolled recursion. They are enumerated in the same order, so tie-breaks are unchanged.group_datasets(method = "exhaustive")attaches a"partitions"attribute with an AIC weight for each partition. It is a diagnostic only, and the likelihood-ratio rule still picks the groups. See Pooling: grouping rule (LRT) vs AIC/BIC, and fit-cache before/after #49 for why AIC is not used to choose.Before vs after (Cryptosporidium, 6 studies)
poolability_combinations()On
pooling-example.csvandcryptosporidium-isolates.csv, every output isidentical()to the previous build, including the agglomerative path.Behaviour notes
data-raw/pooling-article-results.Ralready deduplicate warnings.partitionsimportsgmp. Installing from source needs the system library libgmp; P3M and CRAN serve binaries.Test plan
testthatsuite: 0 failures. 6 skipped becausemiraiisn't installed or the slow oracle is turned off.identical()check on both bundled datasets.gmp/partitionson all platforms.Replaces #50, which closed when its branch was renamed from
perf/tofeat/to satisfy commit lint.