Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[MRG + 1] Fix gradient boosting overflow and various other float comparison on == #7970
What does this implement/fix? Explain your changes.
Before, the code was using == to compare float values and dividing by "zero (~10e-309)" which caused an overflow.
Now I made it so that it's
There are several other instances of this happening, which may cause an error and I want to also address those later on.
In addition, this brings back the numpy.isclose() method which is a standardized way of computing if two float scalars or matrices of arbitrary size are almost close to a threshold.
referenced this pull request
Dec 3, 2016
I also went and did some pep8 housekeeping on the file gradient_boosting.py
Which I wasn't quite sure what to do
And here flake8 suggested doing just
Let me know what you guys think
Apart from reverting all PEP8 changes unrelated to the PR, this LGTM... Thx!
I am unsure if the ValueError is easily reproducible since the original reporter of the error said
But I am fairly confident that this will fix the ValueError because the float will not be compared to
Hmm.. not really. The last few days of finals have been rough and I have been working on my other CountFeaturizer pull request.