  The heuristic identification of peaks from noisy complex spectra often leads
to misunderstanding of the physical and chemical properties of matter. In this
paper, we propose a framework based on Bayesian inference, which enables us to
separate multipeak spectra into single peaks statistically and consists of two
steps. The first step is estimating both the noise variance and the number of
peaks as hyperparameters based on Bayes free energy, which generally is not
analytically tractable. The second step is fitting the parameters of each peak
function to the given spectrum by calculating the posterior density, which has
a problem of local minima and saddles since multipeak models are nonlinear and
hierarchical. Our framework enables the escape from local minima or saddles by
using the exchange Monte Carlo method and calculates Bayes free energy via the
multiple histogram method. We discuss a simulation demonstrating how efficient
our framework is and show that estimating both the noise variance and the
number of peaks prevents overfitting, overpenalizing, and misunderstanding the
precision of parameter estimation.
