X_test should be transformed using the same scaling as the training data or it will lead to incorrect predictions. It is important that the scaling is done using information only from the training set to avoid contamination that could lead to optimistic scores.
Only X_train was being standardized in
evaluate_model.py
.I've just created a variable named
X_test_std
that was created by:X_test
should be transformed using the same scaling as the training data or it will lead to incorrect predictions. It is important that the scaling is done using information only from the training set to avoid contamination that could lead to optimistic scores.