pydata / bottleneck

Fast NumPy array functions written in C
BSD 2-Clause "Simplified" License
1.08k stars 104 forks source link

ADD a 'move_apply' function #452

Open paulinesimon97 opened 5 months ago

paulinesimon97 commented 5 months ago

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:

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