Package: batchmix 2.2.0

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.0.tar.gz
batchmix_2.2.0.zip(r-4.5)batchmix_2.2.0.zip(r-4.4)batchmix_2.2.0.zip(r-4.3)
batchmix_2.2.0.tgz(r-4.4-x86_64)batchmix_2.2.0.tgz(r-4.4-arm64)batchmix_2.2.0.tgz(r-4.3-x86_64)batchmix_2.2.0.tgz(r-4.3-arm64)
batchmix_2.2.0.tar.gz(r-4.5-noble)batchmix_2.2.0.tar.gz(r-4.4-noble)
batchmix_2.2.0.tgz(r-4.4-emscripten)batchmix_2.2.0.tgz(r-4.3-emscripten)
batchmix.pdf |batchmix.html
batchmix/json (API)

# Install 'batchmix' in R:
install.packages('batchmix', repos = c('https://stcolema.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

On CRAN:

4.18 score 3 scripts 310 downloads 43 exports 39 dependencies

Last updated 6 months agofrom:fe1d3e776e. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 08 2024
R-4.5-win-x86_64NOTENov 08 2024
R-4.5-linux-x86_64NOTENov 08 2024
R-4.4-win-x86_64NOTENov 08 2024
R-4.4-mac-x86_64NOTENov 08 2024
R-4.4-mac-aarch64NOTENov 08 2024
R-4.3-win-x86_64NOTENov 08 2024
R-4.3-mac-x86_64NOTENov 08 2024
R-4.3-mac-aarch64NOTENov 08 2024

Exports:batchSemiSupervisedMixtureModelcalcAllocProbcheckDataGenerationInputscheckProposalWindowscollectAcceptanceRatescontinueChaincontinueChainscreateSimilarityMatgammaLogLikelihoodgenerateBatchDatagenerateBatchDataLogPoissongenerateBatchDataMVTgenerateBatchDataVaryingRepresentationgenerateGroupIDsInSimulatorgenerateInitialLabelsgetLikelihoodgetSampledBatchScalegetSampledBatchShiftgetSampledClusterMeansinvGammaLogLikelihoodinvWishartLogLikelihoodminVIplotAcceptanceRatesplotLikelihoodsplotSampledBatchMeansplotSampledBatchScalesplotSampledClusterMeansplotSampledParameterpredictClasspredictFromMultipleChainsprepareInitialParametersprocessMCMCChainprocessMCMCChainsrStickBreakingPriorrunBatchMixrunMCMCChainssampleMVNsampleMVTsamplePriorLabelssampleSemisupervisedMVNsampleSemisupervisedMVTVI.lbwishartLogLikelihood

Dependencies:clicolorspacecpp11dplyrfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerRcppRcppArmadillorlangsalsoscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

batchmix workflow

Rendered frombatchmix_workflow.Rmdusingknitr::rmarkdownon Nov 08 2024.

Last update: 2024-02-15
Started: 2022-06-14

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