### Predicted Probability

We use these features to train a Random Forest to help differentiate between a match and a non-match. Using the forest, we predict on the features you just extracted. Your predicted probability of a match is given below.

### Features

Here are the values of the features computed on the aligned bullet signatures.

### Stage 0: Preliminary Information

This app will walk through the steps used to programmatically determine the probability that two bullets were fired from the same gun barrel. We compare at the bullet land level.

To begin, choose or upload two .x3p files representing the two bullet lands you wish to compare.

This work was developed in collaboration with Omni Analytics Innovative Technologies Initiaitve (OAITI) and the Center for Statistics and Applications in Forensic Evidence (CSAFE) at Iowa State University. These procedures are fully open-source and transparent. For more details on the underlying code, please see the GitHub repository for the companion R package bulletr.

Hare, E., Hofmann, H., and Carriquiry, A., Algorithmic Approaches to Match Degraded Land Impressions. Law, Probability and Risk, mgx018, https://doi.org/10.1093/lpr/mgx018
Hare, E., Hofmann, H., and Carriquiry, A., Automatic Matching of Bullet Land Impressions. Annals of Applied Statistics. doi: 10.1214/17-AOAS1080

### Stage 1: Finding a Stable Region

Below you will find surface topologies of the two bullet lands you have uploaded. You can rotate, pan, zoom, and perform a number of other functions to examine the surfaces.

Our goal is to find a stable region. We want an area of the bullet where there is minimal noise or tank rash, but plenty of pronounced striation markings.

We step through cross-sections of each land at a fixed step size, and uses the CCF (cross-correlation function) to determine stability (a high CCF means that subsequent cross-sections are similar to each other). We begin this procedure near the area where striation markings are typically most pronounced.

We have automatically identified what is believed to be a stable region. You may choose the location to take a cross-section if the algorithm's choice is not satisfactory.

### Stage 2: Removing Grooves

The cross-sections you have taken are shown below. Our next goal will be to remove the grooves, which contain no relevant information for matching, and greatly exceed the size of a typical striation mark.

We use a double-pass smoothing method to determine the location of the grooves. We have again attempted to locate the grooves for you, but you may define them yourself. As you adjust the sliders, the plot will automatically update.

### Stage 3: Removing Global Structure

We have removed the grooves, but the global structure of the cross-section dominates the overall appearance, making striae more difficult to locate.

We are going to fit a loess regression to model this structure. The loess regression includes a span parameter which adjusts the amount of smoothing used. Different values will yield different output. We default to a span of 0.03, but this may be adjusted as desired.

### Stage 4: Aligning Signatures

The residuals from the loess fit we have extracted in the previous stage are called the bullet signatures. They will form the basis for the rest of the analysis.

Because the signatures are defined by the residuals, the peaks and valleys visible in this plot represent the striation markings we are looking for. In order to make matching easier, our next step is to align the two signatures. We suggest an optimal alignment, but it can be adjusted if necessary.

### Stage 5: Peaks and Valleys

With aligned signatures, we now turn our attention to determining what constitutes a peak or a valley. Since there is a lot of noise, this step involves one more smoothing pass.

We can specify a smoothing window, called the smoothing factor, as the number of neighbors to include in the window. For instance, a value of 16 would mean that the nearest 16 points, spanning 16 * 1.5625 = 25 micrometers, would be included.