cerlymarco / linear-tree

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

numpy deprecation warning #28

Closed paul-brenner closed 1 year ago

paul-brenner commented 1 year ago

/lineartree/_classes.py:338: DeprecationWarning:

the interpolation= argument to quantile was renamed to method=, which has additional options. Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they. (Deprecated NumPy 1.22)

Seems like a quick update here would get this warning to stop showing up, right? I can always ignore it, but figured I would mention it in case it is actually an error on my side.

Also, sorry, I don't actually what the best open source etiquette is. If I'm supposed to create a pull request with a proposed fix instead of just mentioning it then feel free to correct me.

cerlymarco commented 1 year ago

Hi, thanks for this catch!

I decided to use the standard linear interpolation/method when computing quantile. This is the same strategy applied in sklearn KBinsDiscretizer for computing quantiles.

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