home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 712052219

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
712052219 MDU6SXNzdWU3MTIwNTIyMTk= 4474 Implement rolling_exp for dask arrays 2560426 open 0     7 2020-09-30T15:31:50Z 2020-10-15T16:32:03Z   NONE      

Is your feature request related to a problem? Please describe. I use dask-based chunking on my arrays regularly and would like to leverage the efficient numbagg implementation of move_exp_nanmean() with rolling_exp().

Describe the solution you'd like It's possible to compute a rolling exp mean as a function of rolling exp means of contiguous, non-overlapping subsets (chunks). You just need to first "un-normalize" the rolling_exps of each chunk in order to split them into their corresponding numerators and denominators (see the ewm definition here under adjust=True). The normalization factor (denominator) to multiply back in to the chunk's move_exp_nanmean() in order to un-normalize it (numerator) is just the move_exp_nanmean() of 1's, replaced with NA's wherever the underlying data was also NA.

Then, scale each chunk's numerator and denominator series (derived from their move_exp_nanmean() series via above) down according to how many "lags-ago" they were, sum the rescaled numerators and denominators across chunks, and finally divide the total summed numerators and denominators.

Describe alternatives you've considered I implemented my own inefficient weighted rolling mean using xarray's rolling(). This requires a bunch of duplicate computation as the window gets shifted.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4474/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.676ms · About: xarray-datasette