Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
a2b8af5
ggm compiles but runtime has a weird error
vandenman Nov 11, 2025
ddeff6e
almost functional and O(P^2) per update
vandenman Nov 12, 2025
481975c
can be tested
vandenman Nov 13, 2025
c6da79c
reduce allocations and factor out common cholesky stuff
vandenman Nov 19, 2025
7b776f3
R interface for raw data and sufficient statistics
vandenman Dec 2, 2025
2224992
fix include of rng_utils.h
vandenman Feb 2, 2026
b8d9e7e
fix include of progressmanager
vandenman Feb 3, 2026
fbec813
rename some things
vandenman Feb 3, 2026
0382d08
add skeleton class
vandenman Feb 3, 2026
192ed83
Checkout
MaartenMarsman Feb 4, 2026
5adc5eb
mostly functional
vandenman Feb 4, 2026
ab32893
algorithms mostly separated from classes
vandenman Feb 6, 2026
8ab9f58
functional and fast but code needs double checking
vandenman Feb 6, 2026
63406f8
almost everything functional, next up are the priors
vandenman Feb 6, 2026
a0a08a5
changes for imputation and edge priors
vandenman Feb 9, 2026
82ba4fb
ggm now also available with support for edge priors
vandenman Feb 9, 2026
88e6545
cleanup
vandenman Feb 9, 2026
5aca4ea
push test for ggms
vandenman Feb 10, 2026
cab6251
revert changes to mcmc_utils.cpp
vandenman Feb 10, 2026
7509827
cleanup
vandenman Feb 11, 2026
84d086b
cleanup
vandenman Feb 11, 2026
f8ae7f4
cleanup
vandenman Feb 11, 2026
99b3c18
cleanup
vandenman Feb 11, 2026
8830e09
Merge main into ggm_mixed
MaartenMarsman Feb 18, 2026
bb0841d
attempt to fix R CMD CHECK
vandenman Feb 19, 2026
5c6162f
Add missing override markers to omrf_model.h
MaartenMarsman Feb 19, 2026
37d36c9
Remove accidental tarball
MaartenMarsman Feb 19, 2026
55d7aee
Fix compiler warnings in new backend
MaartenMarsman Feb 19, 2026
f2c9632
Cleanup
MaartenMarsman Feb 20, 2026
927d807
Align new OMRF backend to legacy and internalize all computations
MaartenMarsman Feb 20, 2026
25346fa
fix(omrf): eliminate cross-TU floating-point drift in MH sampler
MaartenMarsman Feb 21, 2026
c0fcec4
docs(mcmc_utils): unify style, remove dead clamp polyfill
MaartenMarsman Feb 21, 2026
2e16279
Reorganize src/mcmc/: drop mcmc_ prefix, split utils, unify docs
MaartenMarsman Feb 21, 2026
a02a55e
Cleanup
MaartenMarsman Feb 21, 2026
83bb827
Reorganize src/mcmc/: drop mcmc_ prefix, split utils, unify docs
MaartenMarsman Feb 22, 2026
d2c32ce
Remove stray .o.tmp build artifact
MaartenMarsman Feb 22, 2026
b753e52
Rename src/math/ files + add explog tests
MaartenMarsman Feb 22, 2026
36c4767
Make new backend default, and fix to the susbsequent testthat failures
MaartenMarsman Feb 22, 2026
d767cb0
Fix
MaartenMarsman Feb 22, 2026
39e834d
Remove legacy backend (~3,300 lines)
MaartenMarsman Feb 22, 2026
ef220e0
Phase 3A: GGM code cleanup
MaartenMarsman Feb 22, 2026
49c6ddf
Phase 3: GGM prediction, simulation, bug fixes, test expansion
MaartenMarsman Feb 24, 2026
2ca15a4
Phase A-0: golden-snapshot fixtures for scaffolding refactor
MaartenMarsman Feb 24, 2026
7108bf6
Phase A.1: extract validate_variable_types() from check_model/check_c…
MaartenMarsman Feb 24, 2026
985da03
Phase A.2: extract validate_baseline_category() + fix integer check bug
MaartenMarsman Feb 24, 2026
fc8f0e3
Phase A.3: extract validate_edge_prior() + fix NA check ordering
MaartenMarsman Feb 24, 2026
1a8f611
Scaffolding plan
MaartenMarsman Feb 24, 2026
0ab58b8
Phase A.4: extract validate_difference_prior() + unify Bernoulli helpers
MaartenMarsman Feb 24, 2026
d6df27b
A.5: extract validate_missing_data() into R/validate_data.R
MaartenMarsman Feb 24, 2026
6d98878
A.6: extract reformat_ordinal_data() into R/validate_data.R
MaartenMarsman Feb 24, 2026
0252731
A.6b: extract collapse_categories_across_groups() into R/validate_data.R
MaartenMarsman Feb 24, 2026
e3c0c13
A.7: Extract validate_sampler() from bgm() and bgmCompare()
MaartenMarsman Feb 24, 2026
ed33f34
A.8: Extract compute_scaling_factors(); add withr to Suggests
MaartenMarsman Feb 24, 2026
aa28032
docs: Mark scaffolding Phase A-0 and Phase A as complete in plan.md
MaartenMarsman Feb 24, 2026
ab824a1
Phase B.1-B.5: bgm_spec constructor + tests, fix %||% compat
MaartenMarsman Feb 24, 2026
ad32a30
Phase B.6-B.8: build_arguments() + wire bgm_spec into bgm()/bgmCompare()
MaartenMarsman Feb 24, 2026
3a1e750
Phase C: wire bgm_spec pipeline into bgm()/bgmCompare()
MaartenMarsman Feb 25, 2026
28d7997
Update plan
MaartenMarsman Feb 25, 2026
53741f0
Fix slab-mean NA bug; add simulate/predict regression tests (Phase C.6)
MaartenMarsman Feb 25, 2026
1aadf0b
C.8: delete dead monolithic functions, inline compare_reformat_data
MaartenMarsman Feb 25, 2026
ef32d26
Inline transform shims into build_output_bgm(); update plan
MaartenMarsman Feb 25, 2026
48de465
D.1-D.4: consolidate files, delete emptied shells
MaartenMarsman Feb 25, 2026
fe8d7ab
Phase D.5-D.6: regenerate NAMESPACE, unify variable_type validation
MaartenMarsman Feb 25, 2026
115a9c9
Cleanup: remove scaffolding docs, fix function docs, drop withr, fix …
MaartenMarsman Feb 25, 2026
0232e26
Add dev/plans/ to .gitignore (private planning docs)
MaartenMarsman Feb 25, 2026
564097e
Fix GGM centering bug + expanded GGM test suite (Part D)
MaartenMarsman Feb 25, 2026
74ba673
Move GGM imputation plan and reviews to dev/imputation/
MaartenMarsman Feb 25, 2026
77439ec
Add GGM missing data imputation via Gibbs sampling
MaartenMarsman Feb 25, 2026
2be5ca0
Remove dev/imputation: plan completed
MaartenMarsman Feb 25, 2026
25a6cb3
Fix
MaartenMarsman Feb 25, 2026
c938350
fix: reorder GGMModel member initializer lists to match declaration o…
MaartenMarsman Feb 25, 2026
3eceb74
docs: fix extractor functions docs and add documentation strategy (au…
MaartenMarsman Feb 25, 2026
ccfceb1
docs: add @examples/@seealso/@family to S3 methods (audit #2)
MaartenMarsman Feb 25, 2026
c34b674
docs: create .github/copilot-instructions.md (audit #3)
MaartenMarsman Feb 25, 2026
fd06629
docs: create CONTRIBUTING.md and dev/README.md (audit #4)
MaartenMarsman Feb 25, 2026
8fc5fa5
docs: add @family tags to all exported functions (audit #5)
MaartenMarsman Feb 25, 2026
3f6f2a2
docs: update DESCRIPTION for full package scope (audit #6)
MaartenMarsman Feb 25, 2026
63e1dcf
docs: create .editorconfig (audit #7)
MaartenMarsman Feb 25, 2026
b9915a3
docs: document ggm_model.h with Doxygen blocks (audit #8)
MaartenMarsman Feb 25, 2026
f562984
docs: document omrf_model.h public accessors (audit #9)
MaartenMarsman Feb 25, 2026
7d82249
docs: document cholupdate.h with algorithm description (audit #10)
MaartenMarsman Feb 25, 2026
07c6233
docs: document bgmCompare free functions (audit #11)
MaartenMarsman Feb 25, 2026
126fd3a
docs: add pkgdown reference sections (audit #12)
MaartenMarsman Feb 25, 2026
f3231ef
docs: document base_model.h virtual interface (audit #13)
MaartenMarsman Feb 25, 2026
4442e21
docs: document nuts_diagnostics.R helpers (audit #15)
MaartenMarsman Feb 25, 2026
3ec7ae2
style: run bgms_style on package, fix <- to = conversion (audit #16)
MaartenMarsman Feb 25, 2026
b0bad37
docs: document sbm_edge_prior.h and interface (audit #17)
MaartenMarsman Feb 25, 2026
e3da83c
docs: update intro vignette to mention GGM (audit #18)
MaartenMarsman Feb 25, 2026
1eaf4c2
docs: update NEWS.md for GGM and imputation (audit #19)
MaartenMarsman Feb 25, 2026
d8bc09b
docs: update README for GGM support (audit #20)
MaartenMarsman Feb 25, 2026
9a3034c
docs: add .lintr config (audit #21)
MaartenMarsman Feb 25, 2026
ef36760
fix: add lint CI, fix 22 correctness lints, fix styler <- handling
MaartenMarsman Feb 25, 2026
50a5d07
docs: remove dev/documentation/ (audit complete)
MaartenMarsman Feb 25, 2026
78641a3
refactor: convert BaseModel throw-at-runtime methods to pure virtual …
MaartenMarsman Feb 25, 2026
2ae0db2
docs: document rng_utils.h, custom_explog.h, custom_arma_explog.h, ex…
MaartenMarsman Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.{R,r}]
indent_style = space
indent_size = 2

[*.{h,cpp}]
indent_style = space
indent_size = 4

[*.{Rmd,md}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[Makevars*]
indent_style = tab
94 changes: 94 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# bgms — AI Agent Instructions

Rules for AI agents (Copilot, Claude, etc.) working on this codebase.

## R code style

- Use `=` for assignment, not `<-`.
- **Exception**: inside function-call arguments where the result must
be captured, use `<-`. With `=` R treats it as a named argument.
Example: `expect_message(result <- foo(), "pattern")`.
- No space between `if`/`for`/`while` and `(`: write `if(`, not `if (`.
- Enforced by `inst/styler/bgms_style.R`. Run before committing:
```r
source("inst/styler/bgms_style.R")
styler::style_pkg(style = bgms_style)
```
After running, check test files for `expect_*(result = ...)` and
revert those to `result <- ...`.

## Exported R functions (Tier 1)

- Full roxygen2 block: `@title`, `@description`, `@param` (all params),
`@return`, `@examples`, `@seealso`, `@export`.
- `@param` for every parameter, no exceptions. Use `@inheritParams bgm`
for shared parameters.
- `@return` must describe the structure, not just the type.
- `@examples` must be runnable by `R CMD check`. Use `\donttest{}` for
slow examples. Use `\dontrun{}` only when the example truly cannot
run in a clean R session.
- Add `@family` tags: `model-fitting`, `posterior-methods`, `prediction`,
`extractors`, `diagnostics`.
- Never use `@keywords internal` on exported functions.

## Internal R functions (Tier 2)

- Use plain `#` comments, not `#'` roxygen. No `@noRd` unless the
function genuinely benefits from `@inheritParams`.
- Use `# ====` banners for file sections, `# ----` banners per function.
- Format:
```r
# ------------------------------------------------------------------
# function_name
# ------------------------------------------------------------------
# One-sentence purpose.
#
# @param arg1 What it is.
# @param arg2 What it is.
#
# Returns: What comes back.
# ------------------------------------------------------------------
```

## C++ headers (Tier 3)

- Doxygen `/** */` blocks on all classes, public methods, and free
functions. Use `///` for struct fields and enum values.
- Class-level doc is mandatory: explain purpose and place in the
`BaseModel → GGMModel/OMRFModel` hierarchy.
- Private methods get `/** */` blocks. Prefer over-documenting.
- For ported algorithms, add an origin note (source, algorithm name).
- No Doxygen in `.cpp` files — use inline `//` comments only.

## C++ implementations (Tier 4)

- Inline `//` comments for non-obvious steps only.
- Use `// --- Phase N: ... ---` section comments in long functions.
- Reference formulas by name or equation number.

## Error messages

- State what went wrong, why, and what the user can do about it.
- Use complete sentences. Do not start with "Error:" — R adds that.
- See `R/validate_data.R` as the exemplar.

## Commit conventions

- One commit per audit task. Message format:
`docs: short description (audit #N)`.
- When modifying a function signature, update its documentation in
the same commit.
- When adding a new exported function, add it to `_pkgdown.yml`.

## Do not

- Add `@keywords internal` to exported functions.
- Use `\dontrun{}` when `\donttest{}` suffices.
- Add Doxygen blocks in `.cpp` implementation files.
- Use `<-` for assignment in R code.
- Use AI-style prose: no superlatives, no hedging qualifiers, no
transition phrases ("Furthermore", "Moreover", "Additionally").
- Write session-oriented documentation ("in your R session",
"you should see", "run this in your console"). Documentation
describes what a function does and returns, not what the reader
should do interactively.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
on:
push:
branches: [main]
pull_request:
branches: [main]

name: lint

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
name: lint
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ src/sources.mk
docs/*
/doc/
/inst/doc/
dev/plans/
20 changes: 20 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
linters: linters_with_defaults(
assignment_linter = NULL,
indentation_linter = NULL,
brace_linter = NULL,
spaces_inside_linter = NULL,
spaces_left_parentheses_linter = NULL,
commented_code_linter = NULL,
trailing_blank_lines_linter = NULL,
object_name_linter = NULL,
object_length_linter = NULL,
object_usage_linter = NULL,
return_linter = NULL,
line_length_linter = NULL,
T_and_F_symbol_linter(),
seq_linter()
)
exclusions: list(
"R/RcppExports.R",
"inst/"
)
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to bgms

Thank you for your interest in contributing to bgms. This document
covers the practical steps for building, testing, and submitting
changes.

## Getting started

```bash
git clone https://github.com/Bayesian-Graphical-Modelling-Lab/bgms.git
cd bgms
```

Build and check the package:

```r
devtools::document()
devtools::check()
```

## Code style

bgms uses `=` for assignment (not `<-`) and omits the space between
`if`/`for`/`while` and `(`. These rules are enforced by the custom
styler in `inst/styler/bgms_style.R`. Run before committing:

```r
source("inst/styler/bgms_style.R")
styler::style_pkg(style = bgms_style)
```

## Documentation

- **Exported R functions** get full roxygen2 blocks (`@title`,
`@description`, `@param`, `@return`, `@examples`, `@seealso`,
`@export`).
- **Internal R functions** use plain `#` comment blocks, not `#'`
roxygen.
- **C++ headers** use Doxygen `/** */` blocks on classes and methods.
- **C++ implementations** use inline `//` comments only.

When modifying a function signature, update its documentation in the
same commit. When adding a new exported function, add it to
`_pkgdown.yml`.

## Tests

Run the test suite with:

```r
devtools::test()
```

Test files live in `tests/testthat/`. Each `test_that()` description
should be an imperative sentence.

## CI

Pull requests are checked automatically by GitHub Actions:

- `R-CMD-check.yaml` — builds and checks on multiple platforms
- `test-coverage.yaml` — reports test coverage
- `pkgdown.yaml` — builds the documentation site

## Commit messages

Use the format: `type: short description`. Common types: `feat`,
`fix`, `docs`, `refactor`, `test`.

## Contributors

All contributors are acknowledged in `inst/CONTRIBUTORS.md`.
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bgms
Type: Package
Title: Bayesian Analysis of Networks of Binary and/or Ordinal Variables
Title: Bayesian Analysis of Graphical Models
Version: 0.1.6.4
Date: 2026-02-16
Authors@R: c(
Expand All @@ -16,7 +16,10 @@ Authors@R: c(
person("Gali", "Geller", role = "ctb")
)
Maintainer: Maarten Marsman <[email protected]>
Description: Bayesian variable selection methods for analyzing the structure of a Markov random field model for a network of binary and/or ordinal variables.
Description: Bayesian estimation and variable selection for Markov random field
models of networks of binary, ordinal, and continuous variables. Supports
Gaussian graphical models, multi-group comparison via 'bgmCompare', and
provides simulation, prediction, and missing data imputation.
Copyright: Includes datasets 'ADHD' and 'Boredom', which are licensed under CC-BY 4. See individual data documentation for license and citation.
License: GPL (>= 2)
URL: https://Bayesian-Graphical-Modelling-Lab.github.io/bgms/, https://github.com/Bayesian-Graphical-Modelling-Lab/bgms
Expand Down Expand Up @@ -45,6 +48,7 @@ Suggests:
covr,
ggplot2,
knitr,
MASS,
parallel,
qgraph,
rmarkdown,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ S3method(extract_sbm,bgms)
S3method(predict,bgmCompare)
S3method(predict,bgms)
S3method(print,bgmCompare)
S3method(print,bgm_spec)
S3method(print,bgms)
S3method(print,summary.bgmCompare)
S3method(print,summary.bgms)
Expand Down
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# bgms 0.1.6.4

## New features

* Gaussian graphical models (GGM): `bgm(x, variable_type = "continuous")` fits a GGM with Bayesian edge selection. Pairwise effects are partial correlations from the precision matrix.
* Missing data imputation: `na_action = "impute"` integrates over missing values during MCMC sampling for both ordinal and continuous models.

## Bug fixes

* fixed Blume-Capel centering: `observations_` was stored RAW (0-indexed) while `observations_double_` was CENTERED, causing six downstream sites to use wrong values when `baseline_category != 0`. Fixed by centering `observations_` in the constructor for Blume-Capel variables so both representations are in the same coordinate system.
* fixed Blume-Capel imputation: zero-category probability had wrong sign and was double-counted. Replaced with unified loop over all categories, matching `simulate_mrf()`.

# bgms 0.1.6.3

## New features
Expand Down
32 changes: 30 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ run_bgmCompare_parallel <- function(observations, num_groups, counts_per_categor
.Call(`_bgms_run_bgmCompare_parallel`, observations, num_groups, counts_per_category, blume_capel_stats, pairwise_stats, num_categories, main_alpha, main_beta, pairwise_scale, pairwise_scaling_factors, difference_scale, difference_selection_alpha, difference_selection_beta, difference_prior, iter, warmup, na_impute, missing_data_indices, is_ordinal_variable, baseline_category, difference_selection, main_difference_selection, main_effect_indices, pairwise_effect_indices, target_accept, nuts_max_depth, learn_mass_matrix, projection, group_membership, group_indices, interaction_index_matrix, inclusion_probability, num_chains, nThreads, seed, update_method, hmc_num_leapfrogs, progress_type)
}

run_bgm_parallel <- function(observations, num_categories, pairwise_scale, edge_prior, inclusion_probability, beta_bernoulli_alpha, beta_bernoulli_beta, beta_bernoulli_alpha_between, beta_bernoulli_beta_between, dirichlet_alpha, lambda, interaction_index_matrix, iter, warmup, counts_per_category, blume_capel_stats, main_alpha, main_beta, na_impute, missing_index, is_ordinal_variable, baseline_category, edge_selection, update_method, pairwise_effect_indices, target_accept, pairwise_stats, hmc_num_leapfrogs, nuts_max_depth, learn_mass_matrix, num_chains, nThreads, seed, progress_type, pairwise_scaling_factors) {
.Call(`_bgms_run_bgm_parallel`, observations, num_categories, pairwise_scale, edge_prior, inclusion_probability, beta_bernoulli_alpha, beta_bernoulli_beta, beta_bernoulli_alpha_between, beta_bernoulli_beta_between, dirichlet_alpha, lambda, interaction_index_matrix, iter, warmup, counts_per_category, blume_capel_stats, main_alpha, main_beta, na_impute, missing_index, is_ordinal_variable, baseline_category, edge_selection, update_method, pairwise_effect_indices, target_accept, pairwise_stats, hmc_num_leapfrogs, nuts_max_depth, learn_mass_matrix, num_chains, nThreads, seed, progress_type, pairwise_scaling_factors)
get_explog_switch <- function() {
.Call(`_bgms_get_explog_switch`)
}

rcpp_ieee754_exp <- function(x) {
.Call(`_bgms_rcpp_ieee754_exp`, x)
}

rcpp_ieee754_log <- function(x) {
.Call(`_bgms_rcpp_ieee754_log`, x)
}

compute_conditional_ggm <- function(observations, predict_vars, precision) {
.Call(`_bgms_compute_conditional_ggm`, observations, predict_vars, precision)
}

compute_conditional_probs <- function(observations, predict_vars, pairwise, main, num_categories, variable_type, baseline_category) {
Expand All @@ -21,10 +33,26 @@ sample_bcomrf_gibbs <- function(num_states, num_variables, num_categories, pairw
.Call(`_bgms_sample_bcomrf_gibbs`, num_states, num_variables, num_categories, pairwise, main, variable_type_r, baseline_category, iter, seed)
}

sample_ggm_direct <- function(num_states, precision, means, seed) {
.Call(`_bgms_sample_ggm_direct`, num_states, precision, means, seed)
}

run_simulation_parallel <- function(pairwise_samples, main_samples, draw_indices, num_states, num_variables, num_categories, variable_type_r, baseline_category, iter, nThreads, seed, progress_type) {
.Call(`_bgms_run_simulation_parallel`, pairwise_samples, main_samples, draw_indices, num_states, num_variables, num_categories, variable_type_r, baseline_category, iter, nThreads, seed, progress_type)
}

run_ggm_simulation_parallel <- function(pairwise_samples, main_samples, draw_indices, num_states, num_variables, means, nThreads, seed, progress_type) {
.Call(`_bgms_run_ggm_simulation_parallel`, pairwise_samples, main_samples, draw_indices, num_states, num_variables, means, nThreads, seed, progress_type)
}

sample_ggm <- function(inputFromR, prior_inclusion_prob, initial_edge_indicators, no_iter, no_warmup, no_chains, edge_selection, seed, no_threads, progress_type, edge_prior = "Bernoulli", beta_bernoulli_alpha = 1.0, beta_bernoulli_beta = 1.0, beta_bernoulli_alpha_between = 1.0, beta_bernoulli_beta_between = 1.0, dirichlet_alpha = 1.0, lambda = 1.0, na_impute = FALSE, missing_index_nullable = NULL) {
.Call(`_bgms_sample_ggm`, inputFromR, prior_inclusion_prob, initial_edge_indicators, no_iter, no_warmup, no_chains, edge_selection, seed, no_threads, progress_type, edge_prior, beta_bernoulli_alpha, beta_bernoulli_beta, beta_bernoulli_alpha_between, beta_bernoulli_beta_between, dirichlet_alpha, lambda, na_impute, missing_index_nullable)
}

sample_omrf <- function(inputFromR, prior_inclusion_prob, initial_edge_indicators, no_iter, no_warmup, no_chains, edge_selection, sampler_type, seed, no_threads, progress_type, edge_prior = "Bernoulli", na_impute = FALSE, missing_index_nullable = NULL, beta_bernoulli_alpha = 1.0, beta_bernoulli_beta = 1.0, beta_bernoulli_alpha_between = 1.0, beta_bernoulli_beta_between = 1.0, dirichlet_alpha = 1.0, lambda = 1.0, target_acceptance = 0.8, max_tree_depth = 10L, num_leapfrogs = 10L, pairwise_scaling_factors_nullable = NULL) {
.Call(`_bgms_sample_omrf`, inputFromR, prior_inclusion_prob, initial_edge_indicators, no_iter, no_warmup, no_chains, edge_selection, sampler_type, seed, no_threads, progress_type, edge_prior, na_impute, missing_index_nullable, beta_bernoulli_alpha, beta_bernoulli_beta, beta_bernoulli_alpha_between, beta_bernoulli_beta_between, dirichlet_alpha, lambda, target_acceptance, max_tree_depth, num_leapfrogs, pairwise_scaling_factors_nullable)
}

compute_Vn_mfm_sbm <- function(num_variables, dirichlet_alpha, t_max, lambda) {
.Call(`_bgms_compute_Vn_mfm_sbm`, num_variables, dirichlet_alpha, t_max, lambda)
}
Expand Down
Loading
Loading