Computing a Weak Learner's Say
Boosting does not treat its learners as equals. When one of Ardwick Mutual's small learners finishes training, it is scored on the weighted training claims and comes back with an error rate — the share of weight it got wrong. That rate is turned into the size of the learner's vote in the finished ensemble, a single number the algorithm calls its say. A learner no better than tossing a coin should end up with no say whatever, and a learner that is right almost every time should be able to overrule a crowd of mediocre ones.
Task: Print the say this learner has earned.
Input
One line holding one number: the learner's weighted error rate, strictly between 0 and 1.
Output
One line holding the say, rounded to 4 decimal places. The say is half the natural logarithm of the learner's odds of being right — its share of weight got right, set against its share got wrong.
Example:
Input:
0.2
Output:
0.6931
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in