Let's say i have a two dimensional dataset (X and Y variables). My goal is to fit a model that best describes the X-Y relationship Using a training subset of the dataset and then evaluate the performance using another test subset. and let's say i want to normalize/scale the Y vector to a vector with zero mean and standard deviation of 1. What is better and why? Scaling before partitioning, or the converse (do the scaling on the train partition and then the test partition separately)?
Thanks.