nok / sklearn-porter

Transpile trained scikit-learn estimators to C, Java, JavaScript and others.
BSD 3-Clause "New" or "Revised" License
1.28k stars 170 forks source link

Fixed Adaboost implementation #16

Closed der-nico closed 7 years ago

der-nico commented 7 years ago

In the implementation of AdaBoost the threshold value (to displace zero values) was set to the minimum float value, but it should be the float machine epsilon. See implementation in sklearn "_samme_proba" function: https://github.com/scikit-learn/scikit-learn/blob/ab93d65/sklearn/ensemble/weight_boosting.py#L288

nok commented 7 years ago

Thanks for your contribution @der-nico!

Regards, Darius