The Predictive Analysis - Segments (Beta) application facilitates creating, managing, evaluating, and updating your agency’s Safety Performance Functions (SPFs) in an easily accessible interface. Agencies that have not yet developed SPFs can use Predictive Analysis to generate unique SPFs for their roadways based on the Optimal Fit function. Agencies with previously developed SPFs can use Predictive Analysis to evaluate the performance of their SPFs for each segment sub-type, and make any modifications as needed to improve their performance. Additionally, all agencies can use Predictive Analysis to keep a running history of their SPFs and track how they have changed over time.

## Segment Selector

The Segment Selector dropdown of Predictive Analysis allows users to search for and select which segment type they would like to evaluate. All segments are grouped according to the following characteristics: Interstate/Non-Interstate, Urban/Rural, and the number of lanes. Users can select the segment characteristics from the dropdown to display that segment type, and the results will be displayed in the SPF preview.

*Selecting Non Interstate, Rural, 2 Lanes from the Segment Selector.*

## SPF Preview

Once the user has selected the Segment Grouping to evaluate, the SPF preview will display the actual Safety Performance Function, and the date on which it was last modified. Administrators will also have the ability to edit the Function and view the history of the SPF. This can be used to evaluate the effectiveness of any updates or changes to the Function.

*The SPF Preview window displaying the results of the Non Interstate, Rural, 2 Lane Segment Grouping.*

If no Function is currently defined, administrators can click the *Edit Function *button to set the Function to the Optimal Fit, which is Numetric’s recommended SPF for that Segment Grouping (for more detail on the Optimal Fit feature, see the *Optimal Fit section of this *article). Alternatively, administrators can edit the Function to enter their own SPF for that Segment Grouping.

*The SPF Preview with no Function displayed.*

When a Segment Grouping with an operational Function is selected, users can see a graph that plots each segment that meets the grouping criteria. Each segment is plotted with the number of Crashes Per Mile on the vertical axis, and the AADT on the horizontal axis. Each point on the graph represents a Segment. The Blue line represents the SPF, as it is currently defined, and the CURE, and ±2 Sigma are indicated by dotted and dashed lines respectively. Additionally, the R-squared value is provided to help users understand the distribution of the segments.

*The SPF Preview graph with the SPF, CURE, *±2 Sigma* and R-squared values displayed.*

The CURE, or Cumulative Residual, is calculated by adding the difference between the number of crashes projected by the SPF, and the number of crashes actually occurring for each AADT.

The +/- 2 Sigma is a representation of plus, or minus 2 standard deviations.

The Details Sidebar displays metrics related to the selected Segment Grouping: *% of Roadway*, *% of Crashes*, *# of segments, and # of Segments with AADT*.

The *% of Roadway* metric indicates the percentage of the total statewide roadway that is represented in this Segment Grouping. In the example below, 24.69% of the total statewide roadway system is represented by this Segment Grouping.

The *% of Crashes* metric indicates the percentage of the total number of statewide crashes represented in this Segment Grouping. In the example below, 6.42% of the number of statewide crashes are represented by this Segment Grouping.

The *# of Segments* metric indicates the number of segments contained in this Segment Grouping. In the example below, there are 2,784 segments contained in this Segment Grouping.

The # of Segments with AADT metric indicates the number of segments contained in this Segment Grouping for which we have AADT data available. In the example below, there are 2,784 segments in this Segment Grouping for which we have AADT available.

*The Detail Sidebar with the % of roadway, % of crashes, # of segments, and # of Segments with AADT metrics displayed.*

## SPF History

The Details to This allows agencies to track the performance of their SPFs over time, and track historical changes to the function.

Predictive Analysis also allows users to track and view the history of their SPFs. The Edit History & Comments section of the Details Sidebar displays the history of the actual SFP, and any comments that have been added. In this example, we can see that the Optimal Fit feature was used to define the SPF for this Segment Grouping on the 1st of March, 2021.

*The Details Sidebar displaying the current SPF, when it was defined, and who defined it.*

## Segment Flyout

Clicking on any of the points in the SPF Preview chart will highlight that segment in the chart, and open a flyout for the selected segment. This Segment Flyout contains the roadway details, and summary of the selected segment, as well as a Google Streetview thumbnail for the segment.

Additionally, the selected segment (point) will display the Expected Crashes per mile based Empirical Bayes calculations. Additionally, the Adjusted Performance Expectations section in the Segment Flyout will display the expected crashes per mile, and expected crash rate, also based on Empirical Bayes calculations.

*The flyout for a selected Segment.*

## Edit Function

Administrators can also use Predictive Analysis to edit and revise individual Functions. These edits are tracked and allow for historical analysis - making it easy to see if the revisions to the Function are having the desired outcome.

*The Edit Function window, with the user modifying a portion of the selected function.*

## Optimal Fit

The Predictive Analysis application provides its users with an optimal fit functionality, which can be used to generate an SPF based on Numetric’s Optimal Fit feature, which minimizes the average error between the annual crash rates for each of the segments and the SPF.

If an SPF is not entered for the selected Segment Grouping, a button will display the option to *Set to Optimal Fit. *By clicking on this, administrators can set Numetrics Optimal Fit as the Function for that Segment Grouping.

*The Set to Optimal Fit button in the Function Preview window of a given Segment Grouping.*