Is it best to apply MinMaxScaler to your dataset before splitting into training and Validation set or after splitting
There is no rule of thumb, but generally, you definitely want to scale before splitting your dataset.
I will tell you why. Logically, it would be confusing (for the model) while predicting if you have a dataset and split it into three subsets without assuring that the subset are more or less in the same distribution. Now if you are sure that the three subsets have the same distribution and not imbalanced (which is hard to prove) than I see no problem splitting before or after. I would never recommend it though.
Hence, the logical choice is to scale before and then do the splitting. An alternative approach for this is to use the StandardScaler instead of the MinMaxScaler. I find it less sensitive and from my experience, it is in most cases a better choice than the minmax.
I'm really confused as to when I should apply MinMaxScaler or scaling in general to my dataset, whether is before splitting into train_test_split or after splitting into training and validation split, then fit and transform on X_train and transform on X_test. Really confused about what the general rule of thumb is in applying this...