cerlymarco / linear-tree

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

Non coherent splitting results #34

Closed AIProgrammerFan closed 1 year ago

AIProgrammerFan commented 1 year ago

Hello, I have a dataframe with a column X >= 0. I added its index in the parameter split_features of LinearTreeRegressor. I set max_depth to 1 and then used LinearRegression() as a base estimator. When I count the number of samples at node_1 i.e. assumed to be <= to the indicated threshold (from the node_0) I realize that it doesn't correspond to my data for the column X. When I increase max_depth some negative splitting thresholds appear whereas the column X is >= 0 as said previously. do you normalize data or scale it somehow before training? Thanks in advance !

cerlymarco commented 1 year ago

Hi, no normalization/scaling is applied during fitting. could u please provide a reproducible example of the error? Thanks

If u support the project don't forget to leave a star ;-)

AIProgrammerFan commented 1 year ago

Thank you for your prompt feedback. Actually, the scaling was activated by default in a class belonging to my project. Sorry about that.