Skip to content

ADD a 'move_apply' function #452

@paulinesimon97

Description

@paulinesimon97

The idea
With bottleneck move_mean, I can compute more effectively the result of the pandas rolling().mean() chain. It could be good to have an equivalent for rolling().apply(fct,kwargs).

Expected behavior
Then, we will have the possibility to compute any function with a moving window and particularly statistical metrics (mean square error, median square error, mean absolute error...).

Additional context
I would be particularly interested in computing a moving mean square error:
Arguments:

  • data = array of size N
  • ref = array of size M <N (given as argument)
  • window of size M
    moving function to compute: mean((data[window]-ref)**2)

I don't know how to code in C so I cannot implement the function myself. Can someone do it, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions