Closed kstoneriv3 closed 2 weeks ago
Thank you for documenting this and glad you are enjoying the library !
this sounds easy enough to fix in python (check if const already exists and ensure it’s not duplicated) - will try to do that when I get a moment. FYI the weird looking features[-1].fill_null(…
was needed vs just a literal due to some issues with size broadcasting in rust side last I worked on this
Thank you for the reply! I am looking forward to it (though I am in no rush)!!
This should now be resolved - thanks for raising this !
your proposed fix went through w/o issues: https://github.com/azmyrajab/polars_ols/blob/main/polars_ols/least_squares.py#L482C26-L482C32
Thanks a lot for the update!!!
Thanks for creating this awesome library! I found it very handy not having to go back and forth between numpy and polars world for fitting a simple model!
When I run something like the following, I get an error because the
add_intercept=True
creates multiple constant columns instead of a single constant column internally and therefore it fails.This is happens at the following line at https://github.com/azmyrajab/polars_ols/blob/a5e13a07545a41d2326e0957d2717e44f3343c38/polars_ols/least_squares.py#L482C1-L483C1
I think the simplest fix would be to replace it with
but I am not sure if that's the right thing so I created this PR.