WindowedFunctionFilter#
- class myoverse.datasets.filters.temporal.WindowedFunctionFilter(input_is_chunked, is_output=False, name=None, run_checks=True, *, window_size, shift=1, window_function)[source]#
Base class for filters that apply a function to windowed data.
This filter creates windows using _get_windows_with_shift and then applies a specified function to each window.
- Parameters:
input_is_chunked (bool) – Whether the input is chunked or not.
is_output (bool) – Whether the filter is an output filter.
name (str | None) – Name of the filter, by default None.
run_checks (bool) –
Whether to run the checks when filtering. By default, True. If False can potentially speed up performance.
Warning
If False, the user is responsible for ensuring that the input array is valid.
window_size (int) – The window size to use.
shift (int) – The shift to use. Default is 1.
window_function (callable) –
Function to apply to each window (along the last axis).
Note
The function should take two arguments: the window and the axis to apply the function along.
Methods
__init__
(input_is_chunked[, is_output, ...])