Compute the weight α AdaBoost gives a weak learner from its weighted error rate ε.
Implement solve(error).
Returns. Return a float. The error must lie strictly between 0 and 1 (otherwise ValueError). ε<0.5 gives a positive weight, ε=0.5 gives 0, and ε>0.5 gives a negative weight.
Example 1
Input:
solve(0.2)
Output:
0.693147
Example 2
Input:
solve(0.5)
Output:
0.0
Example 3
Input:
solve(0.0)
Output: Raises ValueError.
No results yet
Run your code to check it against the examples, or submit to run every test.