Standardise every column of a training matrix: subtract the column mean and divide by the column population standard deviation (ddof=0). A constant column maps to zeros. Only the supplied matrix is used, so no information from a test set can leak in.
Implement solve(x).
Returns. Return a float NumPy array with the same shape as x, where each non-constant column has mean 0 and standard deviation 1.
Example 1
Input:
solve([[1, 10], [3, 14], [5, 18]])
Output:
[[-1.224745, -1.224745], [0.0, 0.0], [1.224745, 1.224745]]
Example 2
Input:
solve([[2, 7], [2, 9]])
Output:
[[0.0, -1.0], [0.0, 1.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.