Feature Request: Efficient rolling with strides
See original GitHub issueXarray is facing the same issues in its current rolling
implementation (DataArrayRolling
and DatasetRolling
) as described in this pandas issue. Namely, the construct
methods stride parameter is applied after the rolling is computed. Technically, we are computing more than we would need to because we partially throwing it away due to striding.
In PR #3607 the issue is solved for the ...Rolling
’s __iter__
function but not for the construct
, reduce
and _bottleneck_reduce
methods.
Since the way Xarray’s rolling is implemented relies on numpy, we could introduce a sliding window function as described here.
Any opinions?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Advanced NumPy: Master stride tricks with 25 illustrated ...
While it is an esoteric feature, one particularly practical usage is when sliding windows or rolling statistics are concerned. In this article, we...
Read more >Pandas rolling regression: alternatives to looping
Is there a method that doesn't involve creating sliding/rolling "blocks" (strides) and running regressions/using linear algebra to get model ...
Read more >4.7. Implementing an efficient rolling average algorithm with ...
Stride tricks can be useful for local computations on arrays, when the computed value at a given position depends on the neighboring values....
Read more >Run Faster On Trails With Power Hill Strides
In fact, when Megan started coaching during medical school, I saw that as she gathered more real-world data, she prescribed these efforts far ......
Read more >Everything You Need to Know About Running Strides
Strides help to improve speed and efficiency without taxing the body's system too much. We then use strides before workouts and races to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
_Originally posted by @pilkibun in https://github.com/pandas-dev/pandas/issues/26959#issuecomment-511233955_
You are right. It’s quite confusing. I’ve already added a
stride
parameter in my PR #3607 I didn’t follow through with it and at the moment the checks are not successful anymore. Maybe someone else could give an opinion on the pro/cons of astride
parameter in rolling?