Featuring scaling whole data set before spliting it.
You must use the same scaling factors (μ and σ) for training and test data. The reason that you must use the same scaling factors is that you should compare the data with the same pre-processing. Note that scaling factors (μ and σ) must be computed using only the training data. That is because in practice you are not provided with test data and you just have to evaluate your model on test data.