Scale each feature (column) by centering it at its median and dividing by its interquartile range Q3−Q1 (quartiles use linear interpolation).
Implement solve(X).
Returns. Return a NumPy array of the same shape. A column whose interquartile range is zero maps to all zeros.
Example 1
Input:
solve([[1.0], [2.0], [3.0], [4.0]])
Output:
[[-1.0], [-0.333333], [0.333333], [1.0]]
Example 2
Input:
solve([[0.0], [0.0], [0.0], [9.0]])
Output:
[[0.0], [0.0], [0.0], [4.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.