**Multiple Input variables :** Quite often we see regression datasets with multiple input variables. With n-input and one output variable, an n+1 dimensional graph needs to be plotted. It is difficult to draw a plot with more than three dimensions. Linear Regression algorithm will provide a way to visualise this multi-dimensional graph in two dimensions.

A graph between residuals ( target value – predicted value ) vs fitted value ( predicted value ) would explain the relation between multiple input and output variable. The steps are as below.

- Fit a Linear Regression model.
- Predict values for all records.
- Calculate residuals ( target value – predicted value ).
- Fit a graph between residuals and predicted values.

**How it works ?, **the logic is simple, when we fit a straight line through data, relation between ERRORS (target minus predicted value) and PREDICTIONS resembles the relation between INPUT and OUTPUT variables.

**let’s try to understand concept with one input variable first.**