---
title: Residuals
description: The Residuals tab helps you understand the predictive performance and validity of a regression model by letting you gauge how linearly your model scales.

---

# Residuals {: #residuals }

The Residuals tab is designed to help you clearly understand the predictive performance and validity of a regression model. It allows you to gauge how linearly your models scale relative to the actual values of the dataset used.

This tab provides multiple scatter plots and a histogram to assist your residual analysis:

* Predicted vs Actual
* Residual vs Actual
* Residual vs Predicted
* Residuals histogram

<em>Predicted</em> values are those predicted by the model, <em>actual</em> values are the real-world outcome data, and <em>residual</em> values represent the difference of `predicted value - actual value`.

!!! note
	Because these plots are created as part of the model fit process, this tab is only accessible for models created with version 5.2 and later (or after 7/1/2019 for managed AI Platform users). You must manually re-run existing models to view the Residuals tab for them. Additionally, the Residual vs Predicted plot and the Residuals histogram are only available for version 5.3 and later (or after 11/13/2019 for managed AI Platform users). </a>

## Access the Residuals tab {: #access-the-residuals-tab }

The Residuals tab can be accessed from the **Leaderboard**. You can choose to start a new project, or [add a new model](creating-addl-models#adding-models-from-the-leaderboard) to the Leaderboard. All of these options will trigger the model-fit process that creates the scatter plot.

Note that the Residuals tab is not available for frozen run models if there are no out-of-sample predictions. You are redirected to the **Residuals** tab of the parent model.

![](images/pred-act-16.png)

1. To begin, start a new project by importing a dataset.

2. Select a numeric target feature to build a regression model. Set modeling parameters and a build mode; <em>do not</em> enable time-aware modeling (if available).

  	![](images/pred-act-1.png)

3. When a model completes and is available on the **Leaderboard**, expand the model and select **Evaluate** > **Residuals** to display the scatter plot:

  	![](images/pred-act-2.png)

###  Access individual plots {: #access-individual-plots }

From the **Residuals** tab, you can access each plot by selecting the appropriate distribution: **Predictions** or **Residuals**.

![](images/pred-act-12.png)

Select **Predictions distribution** to display the Predicted vs. Actual scatter plot.

![](images/pred-act-13.png)

Select **Residuals distribution** to view the Residual vs Actual plot, the Residual vs Predicted plot, and the Residuals histogram.

![](images/pred-act-14.png)

## Interpret plots and graphs {: #interpret-plots-and-graphs }

Each scatter plot has a variety of analytical components.

###  Accuracy Parameters {: #accuracy-parameters }

![](images/pred-act-3.png)

The reported **Residual mean** value (1) is the mean (average) difference between the predicted value and the actual value.

The reported **Coefficient of determination** value (2), denoted by r^2, is the proportion of the variance in the dependent variable that is predictable from the independent variable.

The **Standard Deviation** value (3) measures variation in the dataset. A low value indicates that the data points tend to be close to the mean; a high value indicates that the data points are spread over a wider range of values.

!!! info “Availability information”
    The standard deviation calculation for these scatter plots is only displayed for Self-Managed AI Platform users with version 5.3 or later.

###  Plot and graph actions {: #plot-and-graph-actions }

!!! tip 

     {% include 'includes/slices-viz-include.md' %}

The **Residuals** plots and graphs have multiple actions available, including data selection, data slices, export, and settings.

![](images/pred-act-9.png)

Below each scatter plot, the **Data Selection** dropdown allows you to switch between data sources. Choose between Validation, Cross Validation, or Holdout data.

The **Export** button allows you to export the scatter plots as a PNG, CSV, or ZIP file:

![](images/pred-act-4.png)

The settings wheel icon allows you to adjust the scaling of the x- and y-axes. Select linear or log scaling for each axis, and all graphs will adjust accordingly.

![](images/pred-act-17.png)

For example, compare the Predicted vs. Actual plot with linear scaling (left) to log scaling (right):

![](images/pred-act-18.png)

To examine an area of any plot more closely, hover over the plot and zoom in or out.

![](images/pred-act-19.png)

Once zoomed in, click and drag the plot to examine different areas.

###  Interact with the scatter plots {: #interact-with-the-scatter-plots }

You can highlight residuals `x` times greater than the standard deviation by toggling the check box on.

![](images/pred-act-10.png)

Enter a value to change the number of times greater the residuals must be than the standard deviation in order for the residuals to be highlighted. For example, if set to 3, the only points highlighted are those with values three times greater than the standard deviation. Highlighted residuals are represented by yellow points:

![](images/pred-act-7.png)

Hovering over individual points on the plots displays the **Data Point** bin. The bin allows you to compare the predicted or residual values to the actual values for a given blue dot. For the predicted vs actual plot, hover over a specific dot to compare how far the predicted value (represented by the blue dot) differs from that specific actual value (represented by the gray line).

![](images/pred-act-5.png)

For the Residual vs Actual plot, hover over a specific point to see the exact residual value for a given actual value. Each dot's coordinates are based on these values (residual for the y-axis coordinate and actual for the x-axis coordinate), and the distance from the horizontal gray line indicates the difference between the predicted and actual values. The greater the difference, the further a point is from the line.

![](images/pred-act-8.png)

The Residual vs Predicted plot is structured the same way, but compares the predicted values to residuals instead.

![](images/pred-act-11.png)

The Residuals histogram bins residuals by ranges of values, and measures the number of residuals in each bin.

![](images/pred-act-15.png)
