Add compression functionality for sccomp and brms posteriors - #1
Merged
Conversation
- Introduced `compress_posterior_to_mclust()` for compressing posterior distributions using Gaussian Mixture Models. - Added `sample_from_mclust()` to regenerate samples from compressed posteriors. - Created vignettes for compressing sccomp and brms models, demonstrating workflows and key functions. - Updated `.gitignore` to exclude temporary files and added new files for benchmarks and documentation.
stemangiola
requested review from
Copilot and
zhanchen
and removed request for
Copilot and
zhanchen
November 18, 2025 03:29
Contributor
Author
|
@zhanchen have a look, to the two Rmd files. I have added routines to convert brms and sccomp output to approximate posterior, to be saved online and download them and routines to reconstruct the posterior draws from the approximates one. it is 1000 times less disk space. Try to have a go, after the poster is done. |
… comprehensive tests for `compress_brmsfit` and `compress_sccomp` functionalities - Updated `evaluate_posterior_density_mclust` to convert vectors to row matrices for consistent input handling. - Introduced extensive test cases for `compress_brmsfit` and `compress_sccomp`, covering various scenarios including error handling, parameter management, and integration tests. - Ensured compatibility with `cmdstanr` backend and validated the structure of compressed outputs.
- Introduced a new R Markdown document demonstrating the process of compressing and regenerating a funnel posterior using Gaussian Mixture Models with the `mclust` package. - Included detailed steps for generating samples, visualizing the original and regenerated distributions, and evaluating compression quality. - Provided code for statistical comparisons and density evaluations to assess the performance of the compression method. - Added visualizations for GMM components and their weights to illustrate the fitting process.
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.
compress_posterior_to_mclust()for compressing posterior distributions using Gaussian Mixture Models.sample_from_mclust()to regenerate samples from compressed posteriors..gitignoreto exclude temporary files and added new files for benchmarks and documentation.