azmyrajab / polars_ols

Polars least squares extension - enables fast linear model polar expressions
MIT License
113 stars 10 forks source link

fix demo notebook, bump version, improve typing. Release v0.3.1 #17

Closed azmyrajab closed 7 months ago

azmyrajab commented 7 months ago

This PR provides minor fixes and cosmetic clean-ups:

  1. improves the type annotations of python API functions to ExprOrStr indicating that user can pass shorthand column names if they wish (i.e. pl.col("y").least_squares.ols("x1", "x2") is a supported equivalent of pl.col("y").least_squares.ols(pl.col("x1"), pl.col("x2")))
  2. fixes demo notebook @AdrienDart https://github.com/azmyrajab/polars_ols/issues/16. The demo notebook should now be more comprehensive and explains "SolveMethod" and "NullPolicy" usage
  3. forces a "rechunk" on rust series prior to conversion to ndarray because that step ensures contiguous memory and zero-copy to ndarray
  4. bumps version to v0.3.1