Blake Moya's contribution to the Discussion of ‘Martingale Posterior Distributions’ by Fong, Holmes and Walker
Blake Moya · Journal of the Royal Statistical Society Series B (Statistical Methodology) · 2023
I would like to congratulate the authors on an expository and intuitive representation of statistical uncertainty. To assist in the further investigation of predictive resampling techniques, I have developed a software package for R (R Core Team, 2022) which implements some of the algorithms presented here as well as from subsequent work (Moya & Walker, 2023). The CopRe package (Moya, 2022), named for the copula resampling technique described in Section 4, can be installed from the Comprehensive R Archive Network with the command: install.packages(‘copre’). The copula resampling algorithm is massively parallelisable, and the simplicity of each recursive update makes implementation in very low-level programming languages quite easy. I have developed CopRe’s core code in C++ (ISO, 2012), parallelised with OpenMP (Chandra et al., 2001). I have also written core code in CUDA (NVIDIA et al., 2020) for running the algorithm on a GPU that is available upon request. A comparison of the running time for the marginal Dirichlet Process Mixture Model (DPMM) sampler of Escobar and West (1994) and Copula Resampling run in serial or parallelised over a CPU or a GPU is shown in Figure 1. The acceleration of nonparametric Bayesian inference presented by the authors is significant. Speedup over the Dirichlet Process Mixture MCMC sampler of Escobar and West (1994) in concert with the sequence resampling approach of Moya and Walker (2023) for the MCMC sampler without resampling extension and three launch configurations for CopRe. The sample size was n=100, k=1000 samples were drawn from each algorithm, and for CopRe N=100 recursive predictive draws were made for each sample. Computations were made with core C++/CUDA code on an Intel Core i5 8600 K clocked to 4.8 GHz and an NVIDIA GTX 1070 Ti. By imposing prior information on the mechanics of the data-generating process rather than on its parameters, predictive resampling of martingale posteriors overcomes many of the difficulties involved with the creation of nonparametric priors, and the implementations of Markov chain Monte Carlo samplers for their corresponding posteriors. The current development version of CopRe contains a new Gibbs-type sequence resampling function, SeqRe, which exploits the known predictive update rule of many Gibbs-type priors to sample full random distributions from mixture models like the DPMM without a known representation of the prior or posterior on the random measure. The development version of the package containing new experimental features can also be installed via the command: I encourage experimenters to take advantage of this software and hope that it will accelerate further investigation of martingale posteriors.