when we are scaling the data i needed some clarification. so for preventing data leakage we split the train and test sets and then perform the scaling on them separately, correct?
so while scaling or label encoding the data in the train and test datasets,
- how do we ensure that the scaling on test set is according to the train set because fit_transform on the train and test sets scale the features differently. so do we just fit on the train set first and transform the train and test set later?
- can we save the scaler so that the new data scaling is done as per the scaler used during training
- the same goes for label encoders and binarizer
i mean what is the industry standard of feature transformation?