FunctionRacerProblemsRace

Zero to One

Beginnerscikit-learnPython

Return X with every column rescaled so that its smallest value becomes 0 and its largest becomes 1.

Example 1

X [[1,100],[2,200],[5,300]]
returns [[0.0,0.0],[0.25,0.5],[1.0,1.0]]

2 is a quarter of the way from 1 to 5, and 200 is halfway from 100 to 300.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More scikit-learn problems