# Linear regression on the results of linear regression

I created a model for predicting a scalar variable from a set of features. I trained a linear regression on a training set, and used the resulting coefficients to produce predictions for a test set.

Then, I did simple linear regression to the predictions as a function of the ground truth values of the test set, expecting a slope of 1 and an intercept of 0. Although I got $R^2 \approx 1$, the slope was significantly different from 1 and the intercept with the vertical axis was significantly different from 0.

What does this tell me about the original linear regression?

What it be more informative to "force intercept to 0" for the second linear regression? This causes the intercept to be exactly 0, the slope becomes closer to 1 and the $R^2$ becomes somewhat smaller.

You mention that you performed a linear regression on the residual plot, which yielded $$R^2\approx1$$. What this tells you is actually very significant: there is a pattern in the residuals. And if there is a pattern in the residuals, that means your regression did not adequately capture the trend of your data. Now you know that the relationship between your explanatory and response variable is not linear.