[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.
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