Closed erinov1 closed 2 months ago
https://github.com/abstractqqq/polars_ds_extension/pull/143
The reason is very subtle... I think I misunderstood what is_elementwise means in polar's plugin register function. I put it there and somehow it messed up the group by. I noticed removing it solves the problem. Still don't know how exactly is_elementwise affects the execution, but the issue should be resolved.
Thanks a lot for pointing it out!
Thanks for the quick fix!
I don't really understand this one, but
lstsq
produces different results between theselect
andgroup_by
contexts whenreturn_pred=True
, with the latter being incorrect.Setup:
Correct results in
select
context (agrees with numpy)Different, incorrect results in
group_by
context (look atA=1
for example and compare to above)On the other hand, the actual coefficients returned in the
select
andgroup_by
contexts agree and are both correct:Unfortunately I can't tell from the code why this is happening.