InferenceAI

Enter at least two characters to search.

Start free

Min-Max Feature Scaling

easyMachine Learning12 min10 XP

Return min-max scaled values rounded to six decimals. If all values are equal, return zeros.

Examples

EXAMPLE WALKTHROUGHrange

A guided view of the published example, not a trace of your code.

INPUT[[2,4,6]]
TASKmin_max_scale()
EXPECTED OUTPUT[0,0.5,1]

Start with the input values shown in this example.

Example 1 of 2

Input: values = [2,4,6]

Output: [0,0.5,1]

Explanation: range

Input: values = [3,3]

Output: [0,0]

Explanation: constant

Hint 1

Subtract the minimum and divide by the range.

Topics

PythonMachine Learning