this is my first post on Stackexchange, so please correct me in any way if I am doing it wrongly.
I just stumbled across this question, I was battling with the same issue, but the posts there greatly clarified things. My question picks up a Slack from that question's discussion.
In an answer to the last comment, the OP asked:
Ok. The coefficients obtained for original data and normalized data are very different. Now if normalization is a recommended procedure, how do i normalize a new test data for whom i have to predict y. Do I have to use the same mean and SD from the training data or they are to be computed from the test data itself? And if the coefficients from the normalized data are used, the predictions are completely out of scale. How do we tackle this issue?
I wanted to pick up that slack. I am aware of the correct answer that was given in response to this question (de-standardise standardised coefficients which were derived from standardised training data and apply those to the new incoming test data to get predictions).
However, I was wondering what you guys think about how to handle y (i.e, the outcome, not the predictors X) of the test data in terms of its mean? More precisely: after having fit my Ridge regression to training data and de-standardised the resulting coefficients including the intercept, I could happily apply that to test data.
But, even if my fitted gradient betas (i.e., the non-intercept betas) reflect well the trend in the test data, it could be that the intercept ('mean') of y in the test data is very different to the mean of y in the training data (= the intercept of the ridge model). If I judge the fit of my ridge model using R^2, the fit would be bad - but solely because of intercept differences.
Therefore, I was wondering whether it makes sense to center y_test, either with its own mean or with the mean of y_train?
Does anyone have any thoughts on this?