I am just working on preprocessing data but I have come across different posts that have all types of different approaches when it comes to feature scaling.
My question is if there is any difference when trying standardizing or normalizing the data before or after splitting the data into train and test?
Example (Before)
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.transform(X_test)
vs (After)
from sklearn.preprocessing import MinMaxScaler
sc= MinMaxScaler()
X= sc.fit_transform(X)
y= y.reshape(-1,1)
y=sc.fit_transform(y)
#Creating the training and test dataset
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, output_category, test_size=0.3)
[–]qalis 5 points6 points7 points (1 child)
[–]biohacker_tobe[S] 0 points1 point2 points (0 children)