Min-max scaling

Easyminmaxaxisbroadcasting· 10 XP

Some models work better when every feature runs from 0 to 1. Min-max scaling does that: (x - min) / (max - min), worked out per column. The numbers are illustrative.

Scale each column of X to the range 0 to 1 and store the result, rounded to 3 decimals.

Expected answer

Store your answer in result.

Hints, the later steps and the answer come with Pro.

import numpy as np

X = np.array([
    [25.0, 50000.0, 2.0],
    [32.0, 64000.0, 5.0],
    [47.0, 120000.0, 1.0],
    [51.0, 88000.0, 4.0],
])
result = ...