Singular ridge regression with homoscedastic residuals: generalization error with estimated parameters