Compute the residuals that a gradient-boosting step fits when the loss is squared error: the difference between the targets and the current ensemble predictions.
Implement solve(y,pred).
Returns. Return a float NumPy array y−y^.
Example 1
Input:
solve([3.0, 5.0, 7.0], [2.5, 5.0, 8.0])
Output:
[0.5, 0.0, -1.0]
Example 2
Input:
solve([1.0, 1.0], [1.0, 1.0])
Output:
[0.0, 0.0]
No results yet
Run your code to check it against the examples, or submit to run every test.