Open bhigy opened 1 year ago
take
The issue is probably in the roll_var() function in _libs/windows/aggregations.pyx
Yes this is clearly a bug. A PR would be welcome.
Hello, I'm encountering the same issue. Any updates on this? It seems like roll_var already uses the Welford method combined with Kahan summation for more stable precision. Is there any algorithm that offers even greater stability than that?
take
You've already been dealing with this issue for a year without any updates. Could anyone raise this issue again?
You've already been dealing with this issue for a year without any updates.
This is typical on the issue tracker. I think it's safe to consider any assigned issue that hasn't seen action for over a month to be abandoned. Any contributor is welcome to pick this up.
Could anyone raise this issue again?
This issue is still open, it does not need to be raised again.
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I am trying to compute a rolling variance and for some reasons, some of the values I obtain are negative. For example, running the code above gives me:
Expected Behavior
All values should be positive and match following array (with the exception of NaN values at the beginning and the end):
Right now, only the value from index 1 to 4 seem to be correct.
Installed Versions