Package: sanba 0.0.4

sanba: Fitting Shared Atoms Nested Models via MCMC or Variational Bayes

An efficient tool for fitting nested mixture models based on a shared set of atoms via Markov Chain Monte Carlo and variational inference algorithms. Specifically, the package implements the common atoms model (Denti et al., 2023), its finite version (similar to D'Angelo et al., 2023), and a hybrid finite-infinite model (D'Angelo and Denti, 2026). All models implement univariate nested mixtures with Gaussian kernels equipped with a normal-inverse gamma prior distribution on the parameters. Additional functions are provided to help analyze the results of the fitting procedure. References: Denti, Camerlenghi, Guindani, Mira (2023) <doi:10.1080/01621459.2021.1933499>, D’Angelo, Canale, Yu, Guindani (2023) <doi:10.1111/biom.13626>, D’Angelo, Denti (2026) <doi:10.1214/24-BA1458>.

Authors:Francesco Denti [aut, cre, cph], Laura D'Angelo [aut]

sanba_0.0.4.tar.gz
sanba_0.0.4.zip(r-4.7)sanba_0.0.4.zip(r-4.6)sanba_0.0.4.zip(r-4.5)
sanba_0.0.4.tgz(r-4.6-x86_64)sanba_0.0.4.tgz(r-4.6-arm64)sanba_0.0.4.tgz(r-4.5-x86_64)sanba_0.0.4.tgz(r-4.5-arm64)
sanba_0.0.4.tar.gz(r-4.7-arm64)sanba_0.0.4.tar.gz(r-4.7-x86_64)sanba_0.0.4.tar.gz(r-4.6-arm64)sanba_0.0.4.tar.gz(r-4.6-x86_64)
sanba_0.0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
sanba/json (API)
NEWS

# Install 'sanba' in R:
install.packages('sanba', repos = c('https://fradenti.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/fradenti/sanba/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblascppopenmp

3.85 score 1 stars 3 scripts 165 downloads 14 exports 15 dependencies

Last updated from:add1e5e2fe. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK262
linux-devel-x86_64OK214
source / vignettesOK259
linux-release-arm64OK220
linux-release-x86_64OK214
macos-release-arm64OK113
macos-release-x86_64OK463
macos-oldrel-arm64OK153
macos-oldrel-x86_64OK463
windows-develOK234
windows-releaseOK242
windows-oldrelOK249
wasm-releaseOK196

Exports:compute_postdenscompute_psmestimate_Gestimate_partitionfit_CAMfit_fiSANfit_fSANget_modelget_paramsget_seed_best_runget_simget_timenumber_clustersplot_vi_allocation_prob

Dependencies:clifarvergluelabelinglifecyclematrixStatsR6RColorBrewerRcppRcppArmadilloRcppProgressrlangsalsoscalesviridisLite

Readme and manuals

Help Manual

Help pageTopics
Compute Posterior Predictive Density Samples for a Groupcompute_postdens
Compute and Plot the Posterior Similarity Matrixcompute_psm
Estimate the Atoms and Weights of the Discrete Mixing Distributionsestimate_G plot.SANvi_G print.SANvi_G summary.SANvi_G
Estimate the Observational and Distributional Partitionestimate_partition estimate_partition.SANmcmc estimate_partition.SANvi plot.partition_mcmc plot.partition_vi print.partition_mcmc print.partition_vi summary.partition_mcmc summary.partition_vi
Fit the Common Atoms Mixture Modelfit_CAM
Fit the Finite-Infinite Shared Atoms Mixture Modelfit_fiSAN
Fit the Finite Shared Atoms Mixture Modelfit_fSAN
Accessor Functions for SAN Model Outputsget_model get_model.SANmcmc get_model.SANvi get_params get_params.SANmcmc get_params.SANvi get_seed_best_run get_seed_best_run.SANvi get_sim get_sim.SANmcmc get_sim.SANvi get_time get_time.SANmcmc get_time.SANvi
Estimate the Number of Observational and Distributional Clustersnumber_clusters
Plot Variational Cluster Allocation Probabilitiesplot_vi_allocation_prob
Visual Check of the Convergence of the MCMC Outputplot.SANmcmc
Plot Posterior Density Samplesplot.SANmcmc_postdens
Visual Check of the Convergence of the VI Outputplot.SANvi
Print the MCMC Outputprint.SANmcmc
Print the Variational Inference Outputprint.SANvi
Summarize the MCMC Outputsummary.SANmcmc
Summarize the Variational Inference Outputsummary.SANvi