cerlymarco / linear-tree

A python library to build Model Trees with Linear Models at the leaves.
MIT License
351 stars 54 forks source link

Potential bug in LinearForestClassifier 'predict_proba' #22

Closed PiotrKaszuba closed 2 years ago

PiotrKaszuba commented 2 years ago

Hello! Thank you for useful package!

I think I might have found a potential bug in LinearForestClassifier.

I expected 'predict_proba' to use 'self.decision_function', similarly to 'predict' - to include predictions from both estimators (base + forest). Is that a potential bug or am I in wrong here?

https://github.com/cerlymarco/linear-tree/blob/8d5beca8d492cb8c57e6618e3fb770860f28b550/lineartree/lineartree.py#L1560

cerlymarco commented 2 years ago

Hi, thanks for reporting this. Now it should be fixed.

pip install --upgrade linear-tree

to download the latest changes.