why to use Scaler.fit only on x_train and not on x_test for normalizing value using MinMaxScaler?
If you would fit the scaler using x_test you would be using information from your test set and would be leaking data. This is information that you would not have if your model was in production and can therefore not use when fitting your model.