Scale every feature into [0, 1] using statistics learned on the training data only.
Implement a class MinMaxScaler with:
fit(X): store each column's min and max, return selftransform(X): (X - min) / (max - min). A constant column (max == min) maps to 0.inverse_transform(Z): undo the scalingTest data can fall outside the training range, so transformed values may be below 0 or above 1. That's expected.