Skip to content

C++ revamp + add GGM#78

Open
vandenman wants to merge 95 commits intomainfrom
ggm_mixed
Open

C++ revamp + add GGM#78
vandenman wants to merge 95 commits intomainfrom
ggm_mixed

Conversation

@vandenman
Copy link
Collaborator

https://github.com/Bayesian-Graphical-Modelling-Lab/issues/issues/19

Does not add classes for priors.

Needs a thorough review and validation of the functionality and computational speed.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@MaartenMarsman
Copy link
Collaborator

There appears to be a mismatch between function documentation and signatures.

MaartenMarsman and others added 4 commits February 18, 2026 22:21
Conflicts resolved:
- mcmc_memoization.h: Keep single-entry cache (benchmarked equivalent to hash-map)
- mcmc_nuts.h: Use main's joint-only API
- mcmc_utils.cpp: Use main's refactored step-size heuristic
- RcppExports.R: Regenerated via rebuild

Updated ggm_mixed files to use main's API:
- adaptive_gradient_sampler.h: Pass (grad, joint) instead of (log_post, grad)
- hmc_sampler.h: Same API update
C++ (GGMModel):
- Store observations matrix and missing-data index when na_impute=true
- impute_missing(): Gibbs sweep from conditional Gaussian
- update_suf_stat_for_imputation(): incremental O(p) rank-1 update

Interface (sample_ggm.cpp / RcppExports):
- Add na_impute and missing_index_nullable parameters

R side:
- Remove GGM+impute guard in validate_data.R; add entire-column guard
- Wire na_impute/missing_index through run_sampler.R
- Remove column_means from spec, build_arguments, predict, simulate
- predict now self-centers newdata; simulate uses zero mean vector
- center_continuous_data() returns centered matrix only
- Add Missing Data section to bgm() roxygen docs

Tests:
- 7 GGM imputation integration tests (test-bgm.R)
- 3 GGM impute validation tests (test-validate-missing-data.R)
- Remove obsolete impute-not-supported-for-GGM spec test
- Update build-arguments and predict tests for column_means removal
…rder

Fixes -Wreorder warnings on windows-latest GHA builds. The initializer
lists in both the raw-observations constructor and the copy constructor
had precision_proposal_ before observations_, but the class declares
observations_ first.
…dit #1)

- Remove @Keywords internal from exported extractor functions
- Fix ##' to #' roxygen comment marker
- Add @return with per-function descriptions
- Add @examples block with runnable examples
- Add @Seealso and @family extractors
- Move %||% polyfill from extractor_functions.R to zzz.R
- Add dev/documentation/ (strategy, audit, reviews)
- Add .github/workflows/lint.yaml (runs lintr on PRs)
- Remove line_length_linter from .lintr (cosmetic, would block CI)
- Fix T/F symbol lints: rename T -> n_total in mcmc_summary.R
- Fix seq lints: 1:length() -> seq_along(), 1:nrow() -> seq_len(nrow())
- Fix vector logic lints: | -> || and & -> && in scalar if() conditions
- Fix styler-broken tests: result = -> result <- inside expect_*() calls
- Fix scaffolding fixtures: use test_path() for relative path resolution
- Improve styler to preserve <- inside function-call arguments
- Update copilot-instructions.md with <- exception rule
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