so i am using the fetch_california_housing() dataset from scikit-learn and did some simple linear regression with this. Here is a screenshot of the dataset characteristics.
I plotted the predicted values over the true values, as you can see in the following screenshot, and found a mean square error of 4.638.
What i find strange is that the plot does not look linear, but rather like x^(some power less than 1) or like log(x). I know we can do some transformation onto our feature vector x and do linear regression with this transformed value. When i try to raise the first 5 different x values (since these must be positive) to some power less than 1, and plug it into the normal equations, I however get a much higher MSE (e.g. 656.1).
Is what I am doing here making sense? When i see this plot and see it is not linear, is it sensible to try to transform X in some way such that the plot looks linear? I know I am plotting over target values and not input values, so maybe it does not make sense to expect the plot to look linear (even though the inputs might affect the target linearly)? My thought process is basically that I am doing linear regression (in the weights and inputs) so the plot should look linear too, or otherwise there exists some transformation which achieves a smaller MSE and therewith a a linear plot, or maybe not? I do not have much experience with regression so if someone could tell me a bit more about how to think about this and when it makes sense to transform the data and how?
Very much appreciate any feedback and inputs!