# Prediction Distribution graph
URL: https://docs.datarobot.com/en/docs/classic-ui/modeling/analyze-models/evaluate/roc-curve-tab/pred-dist-graph.html

> The Prediction Distribution graph on the ROC Curve tab helps you evaluate classification models by showing the distribution of actual values in relation to the prediction threshold.

# Prediction Distribution graph

The Prediction Distribution graph (on the [ROC Curve](https://docs.datarobot.com/en/docs/classic-ui/modeling/analyze-models/evaluate/roc-curve-tab/roc-curve-tab-use.html) tab) illustrates the distribution of actual values in relation to the [display threshold](https://docs.datarobot.com/en/docs/classic-ui/modeling/analyze-models/evaluate/roc-curve-tab/threshold.html#set-the-display-threshold) (a dividing line for interpreting results).

To use the Prediction Distribution graph:

1. Select a model on the Leaderboard and navigate toEvaluate > ROC Curve.
2. Select adata sourceand set thedisplay threshold. The Prediction Distribution graph updates, showing the display threshold line. Every prediction to the left of the dividing line is classified as "false" and every prediction to the right of the dividing line is classified as "true." The Prediction Distribution graph visually expresses model performance for the selected data source. Based onClassification use case 2, this Prediction Distribution graph shows the predicted probabilities for the two groups of patients (readmitted and not readmitted), illustrating how well your model discriminates between them. The colors correspond to the rows of the confusion matrix—red represents patients not readmitted, blue represents readmitted patients. You can see that both red and blue fall on either side of thedisplay threshold.
3. Interpret the graph using this table: Color on graphLocationStateredleft of the thresholdtrue negative (TN)blueleft of the thresholdfalse negative (FN)redright of the thresholdfalse positive (FP)blueright of the thresholdtrue positive (TP) Note that the gray represents the overlap of red and blue. With a classification problem, each prediction corresponds to a single observation (readmitted or not, in this example). The Prediction Distribution graph shows the overall distribution of the predictions for all observations in the selected data source.
4. Select one of the following from theY-Axisdropdown. TheY-Axisdistribution selector allows you to choose between showing the Prediction Distribution graph as a density or frequency curve: DensityFrequencyThe chart displays an equal area underneath both the positive and negative curves.The area underneath each curve varies and is determined by the number of observations in each class. The distribution curves are based on the data source and/or distribution selection. Alternating betweenFrequencyandDensitychanges the curves but does not change the threshold or any values in the associated page elements.

## Experiment with the Prediction Distribution graph

Try the following changes and observe the results.

1. Pass your cursor over the Prediction Distribution graph. The threshold value displays in white text as you move your cursor. For curves displayed in theChartpane (a ROC curve shown here), DataRobot displays a circle that dynamically moves to correspond with the threshold value.
2. Click on the Prediction Distribution graph to select a new threshold value. The new value appears in theDisplay Thresholdfield. The circle and intercept lines on the Prediction Distribution graph update to the new threshold value. The Metrics pane, the Chart pane (set toROC Curvehere), and the Matrix pane (set toConfusion matrixhere) also update to reflect the new threshold. Alternatively, you canchange the threshold settingby typing a new value in the threshold field.
3. Click theY-Axisdropdown to switch the prediction's distribution between displaying aDensityorFrequencycurve. This change does not impact other page elements.

---
