Skip to content

Add compression functionality for sccomp and brms posteriors - #1

Merged
zhanchen merged 3 commits into
mainfrom
compress-posterior
May 5, 2026
Merged

Add compression functionality for sccomp and brms posteriors#1
zhanchen merged 3 commits into
mainfrom
compress-posterior

Conversation

@stemangiola

Copy link
Copy Markdown
Contributor
  • 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.

- 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
stemangiola requested review from Copilot and zhanchen and removed request for Copilot and zhanchen November 18, 2025 03:29
@stemangiola

stemangiola commented Nov 18, 2025

Copy link
Copy Markdown
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.
@zhanchen
zhanchen merged commit 86fa6c2 into main May 5, 2026
2 of 3 checks passed
zhanchen added a commit that referenced this pull request May 7, 2026
…ior"

This reverts commit 86fa6c2, reversing
changes made to ead0111.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants