Abstract
Abstract
Due to the high dimensionality or multimodality that is common in modern astronomy, sampling Bayesian posteriors can be challenging. Several publicly available codes based on different sampling algorithms can solve these complex models, but the execution of the code is not always efficient or fast enough. The article introduces a C language general-purpose code, Nii-C, that implements a framework of automatic parallel tempering Markov Chain Monte Carlo. Automatic in this context means that the parameters that ensure an efficient parallel tempering process can be set by a control system during the inital stages of a sampling process. The autotuned parameters consist of two parts, the temperature ladders of all parallel tempering Markov Chains and the proposal distributions for all model parameters across all parallel tempering chains. In order to reduce dependencies in the compilation process and increase the code’s execution speed, Nii-C code is constructed entirely in the C language and parallelized using the message-passing interface protocol to optimize the efficiency of parallel sampling. These implementations facilitate rapid convergence in the sampling of high-dimensional and multimodal distributions, as well as the expeditious code execution time. The Nii-C code can be used in various research areas to trace complex distributions due to its high sampling efficiency and quick execution speed. This article presents a few applications of the Nii-C code.
Funder
National Natural Science Foundation of China
Youth Innovation Promotion Association
Anhui Normal University
Publisher
American Astronomical Society