MyNixOS website logo
Description

Wasserstein Barycenters of Subset Posteriors.

Functions to compute Wasserstein barycenters of subset posteriors using the swapping algorithm developed by Puccetti, Rüschendorf and Vanduffel (2020) <doi:10.1016/j.jmaa.2017.02.003>. The Wasserstein barycenter is a geometric approach for combining subset posteriors. It allows for parallel and distributed computation of the posterior in case of complex models and/or big datasets, thereby increasing computational speed tremendously.

waspr

CRAN_Status_Badge DOI

The goal of waspr is to compute Wasserstein barycenters of subset posteriors.

Installation

The R-package waspr can be installed from CRAN as follows:

install.packages("waspr")

You can install a beta-version of waspr from github with:

install.packages("devtools")
devtools::install_github("joliencremers/waspr")

Citation

To cite the package ‘waspr’ in publications use:

Jolien Cremers (2020). waspr: Wasserstein Barycenters of Subset Posteriors. R package version 1.0.1. https://CRAN.R-project.org/package=waspr

or

Jolien Cremers (2020). waspr: Wasserstein Barycenters of Subset Posteriors. Zenodo, doi: 10.5281/zenodo.3971910

Example

This is a basic example which shows you how to compute the Wasserstein barycenter from a set of MCMC outputs for several data subsets. A more extensive explanation of the usage of the package can be found in the Tutorial vignette.

library(waspr)
#> 
#> Attaching package: 'waspr'
#> The following object is masked from 'package:base':
#> 
#>     summary

wasp(pois_logistic,
     par.names = c("beta_s", "alpha_l", "beta_l",
                   "baseline_sigma", "baseline_mu",
                   "correlation", "sigma_s", "sigma_l"))
#> 
#> 
#> WASP 
#> 
#> Call: 
#> wasp(mcmc = pois_logistic, par.names = c("beta_s", "alpha_l", 
#>     "beta_l", "baseline_sigma", "baseline_mu", "correlation", 
#>     "sigma_s", "sigma_l"))
#> 
#> Swapping algorithm: 
#> iter = 10
#> acc = 0.001
#> 
#> MCMC: 
#> subsets = 8
#> parameters = 8
#> samples = 450
#> 
#> Posterior summary of the Wasserstein Barycenter: 
#>                      mean       mode         sd      LB HPD     UB HPD
#> beta_s          0.5527601  0.5518034 0.10988949  0.36598187  0.7896041
#> alpha_l         2.6811079  2.6959176 0.19199304  2.30380675  3.0295802
#> beta_l          0.7508520  0.7339988 0.21631011  0.37281283  1.1740767
#> baseline_sigma  0.3563222  0.3811609 0.06859910  0.21910807  0.4870079
#> baseline_mu    -0.8008872 -0.7516167 0.10867533 -1.01168299 -0.5944583
#> correlation     0.1732170  0.1392670 0.07437737  0.02824474  0.3059979
#> sigma_s         1.7225455  1.7535499 0.17920847  1.40126462  2.0610585
#> sigma_l         1.2190297  1.2612822 0.07558163  1.06768047  1.3569757
Metadata

Version

1.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows