AWS-inspired monitoring model combines numeric signals that arrive on very different scales. Before training, the team needs every feature mapped to a fixed interval, so you need to implement min-max scaling and handle the stated boundary cases correctly.
Map the values linearly so the minimum becomes 0 and the maximum becomes 1. If all values are equal (the range is zero) return all zeros.
Implement solve(x).
Returns. Return a float NumPy vector in [0,1].
Example 1
Input:
solve([10.0, 20.0, 30.0])
Output:
[0.0, 0.5, 1.0]
Example 2
Input:
solve([5.0, 5.0, 5.0])
Output:
[0.0, 0.0, 0.0]
Example 3
Input:
solve([-1.0, 0.0, 3.0])
Output:
[0.0, 0.25, 1.0]
No results yet
Run your code to check it against the examples, or submit to run every test.