Package: batchmix 2.2.1

Stephen Coleman

batchmix: Semi-Supervised Bayesian Mixture Models Incorporating Batch Correction

Semi-supervised and unsupervised Bayesian mixture models that simultaneously infer the cluster/class structure and a batch correction. Densities available are the multivariate normal and the multivariate t. The model sampler is implemented in C++. This package is aimed at analysis of low-dimensional data generated across several batches. See Coleman et al. (2022) <doi:10.1101/2022.01.14.476352> for details of the model.

Authors:Stephen Coleman [aut, cre], Paul Kirk [aut], Chris Wallace [aut]

batchmix_2.2.1.tar.gz
batchmix_2.2.1.tar.gz(r-4.5-noble)batchmix_2.2.1.tar.gz(r-4.4-noble)
batchmix_2.2.1.tgz(r-4.4-emscripten)batchmix_2.2.1.tgz(r-4.3-emscripten)
batchmix.pdf |batchmix.html
batchmix/json (API)

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

Peer review:

Bug tracker:https://github.com/stcolema/batchmix/issues

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

3.30 score 3 scripts 276 downloads 43 exports 39 dependencies

Last updated 6 months agofrom:d62bde9e8e. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-linux-x86_64OKNov 04 2024

Exports:batchSemiSupervisedMixtureModelcalcAllocProbcheckDataGenerationInputscheckProposalWindowscollectAcceptanceRatescontinueChaincontinueChainscreateSimilarityMatgammaLogLikelihoodgenerateBatchDatagenerateBatchDataLogPoissongenerateBatchDataMVTgenerateBatchDataVaryingRepresentationgenerateGroupIDsInSimulatorgenerateInitialLabelsgetLikelihoodgetSampledBatchScalegetSampledBatchShiftgetSampledClusterMeansinvGammaLogLikelihoodinvWishartLogLikelihoodminVIplotAcceptanceRatesplotLikelihoodsplotSampledBatchMeansplotSampledBatchScalesplotSampledClusterMeansplotSampledParameterpredictClasspredictFromMultipleChainsprepareInitialParametersprocessMCMCChainprocessMCMCChainsrStickBreakingPriorrunBatchMixrunMCMCChainssampleMVNsampleMVTsamplePriorLabelssampleSemisupervisedMVNsampleSemisupervisedMVTVI.lbwishartLogLikelihood

Dependencies:clicolorspacecpp11dplyrfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerRcppRcppArmadillorlangsalsoscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

batchmix workflow

Rendered frombatchmix_workflow.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2024-02-16
Started: 2022-06-21

Readme and manuals

Help Manual

Help pageTopics
Bayesian Mixture Modelling for Joint Model-Based Clustering/Classification and Batch Correctionbatchmix-package batchmix
Batch semisupervised mixture modelbatchSemiSupervisedMixtureModel
Calculate allocation probabilitiescalcAllocProb
Check data generation inputscheckDataGenerationInputs
Check proposal windowscheckProposalWindows
Collect acceptance ratecollectAcceptanceRates
Continue chaincontinueChain
Continue chainscontinueChains
Create Similarity MatrixcreateSimilarityMat
Gamma log-likelihoodgammaLogLikelihood
Generate batch datagenerateBatchData
Generate batch datagenerateBatchDataLogPoisson
Generate batch data from a multivariate t distributiongenerateBatchDataMVT
Generate batch datagenerateBatchDataVaryingRepresentation
Generate group IDsgenerateGroupIDsInSimulator
Generate initial labelsgenerateInitialLabels
Get likelihoodgetLikelihood
Get sampled batch shiftgetSampledBatchScale
Get sampled batch shiftgetSampledBatchShift
Get sampled cluster meansgetSampledClusterMeans
Inverse gamma log-likelihoodinvGammaLogLikelihood
Inverse-Wishart log-likelihoodinvWishartLogLikelihood
Minimium VIminVI
Plot acceptance ratesplotAcceptanceRates
Plot likelihoodsplotLikelihoods
Plot sampled batch meansplotSampledBatchMeans
Plot sampled batch scalesplotSampledBatchScales
Plot sampled cluster meansplotSampledClusterMeans
Plot sampled vector parameterplotSampledParameter
Predict classpredictClass
Predict from multiple MCMC chainspredictFromMultipleChains
Prepare initial valuesprepareInitialParameters
Process MCMC chainprocessMCMCChain
Process MCMC chainsprocessMCMCChains
Random Draw From Stick Breaking PriorrStickBreakingPrior
Run Batch Mixture ModelrunBatchMix
Run MCMC ChainsrunMCMCChains
Sample mixture of multivariate normal distributions with batch effectssampleMVN
Sample mixture of multivariate t-distributions with batch effectssampleMVT
Sample prior labelssamplePriorLabels
Sample semi-supervised MVN Mixture modelsampleSemisupervisedMVN
Sample semi-supervised MVT Mixture modelsampleSemisupervisedMVT
Minimum VI lower boundVI.lb
Wishart log-likelihoodwishartLogLikelihood