Compute the out-of-bag accuracy of a bagged ensemble: the fraction of samples whose out-of-bag prediction equals the true label. y_true and y_pred are aligned label arrays.
Implement solve(y_true, y_pred).
Returns. Return a float in [0,1].
Example 1
Input:
solve([0, 1, 1], [0, 0, 1])
Output:
0.666667
Example 2
Input:
solve([1, 2, 2], [1, 2, 2])
Output:
1.0
No results yet
Run your code to check it against the examples, or submit to run every test.