# Application of the Approximate Bayesian Computation Algorithm to Gamma-Ray Spectroscopy
## 5 Net Peak Area Extraction and ABC
### Abc
Model parameter \(\theta\) specifies which isotopes are present and in what amounts, and \(P(x|\theta)\) is the forward model such as Equation (1) or GADRAS [21]. To illustrate, \(10^{5}\) simulations of one-peak and two-peak regions (overlapping peaks) were simulated. Using ABC, when the true model was the same as the assumed model, parametric-based area estimation has a smaller RMSE than non-parametric estimation. However, when the assumed model is only modestly different from the true model, the non-parametric based area estimation has a lower RMSE (see below for more detail). ABC is also effective for choosing the number of peaks in a region. For example, in a small energy region, either one or two peaks appear to be present to the eye. ABC sometimes chooses one peak, and sometimes chooses two peaks in simulated repeats of the same data. For example, Figure 5 plots the data and fit and the corresponding residuals defined as usual as residual = data - fit when the true data have one peak or two peaks and the fitted model always has one peak. The pattern and magnitude in the residuals in the peak region in both (b) and (d) suggests a much worse fit in (d). The residuals in (d) would be flagged by a scan statistic [35], leading to a rejection of the one-peak fit. A scan statistic scans for the largest sum of consecutive positive residuals; a separate scan statistic can be computed that scans for the smallest sum of consecutive negative residuals. Moreover, the maximum of the scan statistic over the analysis region can easily be included as a candidate summary statistic in ABC. One nice feature of ABC is that the goodness-of-fit scores to compare fits with one, two, or more peaks can be used as summary statistics, which are used to approximate the posterior probability of a candidate set of model parameter values such as the isotopic composition of the item being assayed. In any peak-fitting approach, one must choose the energy region using some type of figure of merit [36]. ABC also provides an option to choose the energy region for the analysis of residuals, using trial and error to determine which energy region leads to the best inference. To illustrate ABC, 100 energy bins were chosen that only included the dominant peak at 185.7 keV (from U-235); summary statistics included the maximum of each of two scan statistics (one scanning for a large sum of consecutive positive residuals between data and fit and the other scanning for a large sum of consecutive negative residuals), the average residual, and the minimum and maximum residual for a total of five candidate summary statistics scan statistics. In \(10^{5}\) test items and using a training size of \(10^{5}\) simulated data sets (using \(f(E)\) in Equation (1) with Poisson variation), the misclassification rate was 0.2% (134 misclassified out of \(10^{5}\), with 107 having two peaks classified as having one peak and 117 having one peak classified as having two peaks). Each simulated data set had one peak only with a probability of 0.5 and had the same peak plus a nearby peak at 187.7 keV with a probability of 0.5. All simulated data sets were normalized by dividing by the maximum count rate, so all scaled count values ranged from 0 to 1, to deliberately avoid trivially obvious discrimination (that would not be available in applications of interest) between the two classes (class 1 has one peak; class 2 has two peaks) based on the average count rate near the peak. ABC is thus showing strong potential for this type of model selection and will be further investigated for its potential in selecting the number of peaks present in an analysis region. To illustrate, the peak location (center) and height were estimated using either parametric (using Equation (1)) or nonparametric estimation in ABC. One set of ABC runs used the parametric estimation results as summary statistics and a second set of ABC runs used the nonparametric estimation results as summary statistics.