iso_forest icon indicating copy to clipboard operation
iso_forest copied to clipboard

Fix error: Division by zero in c_factor

Open hellocoldworld opened this issue 4 years ago • 0 comments

Hello! We were working with some experimental data and found out that in some cases the algorithm would throw an error because we were dividing by zero in the function c_factor. We narrowed down the bug and found that it was because some nodes of type 'exNode' are of size zero (these are generated in the method make_tree - lines 89-93). A simply change from the equality check to the minor or equal check fixed that for us.

hellocoldworld avatar May 03 '21 18:05 hellocoldworld