EconML icon indicating copy to clipboard operation
EconML copied to clipboard

Avoid double impurity calculation inside criterion.pyx in tree module

Open gdaiha opened this issue 1 year ago • 1 comments

Inspired by https://github.com/scikit-learn/scikit-learn/pull/18203/files# in Sklearn`s RandomForest, this PR aims to avoid double calculation of impurity inside criterion.pyx of tree module

gdaiha avatar May 10 '24 16:05 gdaiha

Can't understand exactly why these tests are failing. The only thing I've done here was to move impurity_improvement after the calculation of best.impurity_left and best.impurity_right and changed impurity_improvement signature. Tests are claiming for errors in shape of outputs of grf and cf tests

gdaiha avatar May 10 '24 18:05 gdaiha