series operations¶
This module contains various utility functions for working with time series data represented as ndarray
- filter_sliding_quantile_range(series, window_size, q_lower, q_upper, copy=True)¶
Filters a time series by sliding quantile range.
- filter_sliding_quantile_range_1d(array, window_size, q_lower, q_upper)¶
Filter values of a 1D array within a sliding quantile range.
- sample(series, timestamps_series, timestamps, *, keep_dtype)¶
Samples a time series at specified timestamps.
This function interpolates values from a time series at given timestamps. It uses linear interpolation to estimate values between the known data points.
Parameters: series: The time series data to sample. timestamps_series: The timestamps corresponding to the time series data. timestamps: The timestamps at which to sample the time series. keep_dtype: Whether to preserve the original data type of the series.
- sample_1d(array, timestamps_array, timestamps, *, keep_dtype)¶
Sample a 1D array at specified timestamps, can be used for interpolation.
- Parameters:
- Return type:
- Returns:
The sampled array.
- sign_change_latency(series)¶
Calculates the latency of sign changes in a time series.
- sign_change_latency_1d(array)¶
Calculate the latency between sign changes in a 1D array.
- smooth(series, filter_funcs, copy=True)¶
Smooths a time series using a set of smoothing functions.
- Parameters:
series (
ndarray) – The time series data.filter_funcs (
Iterable[SmoothingFunction]) – The smoothing functions.copy (
bool, default:True) – Whether to copy the series.
- Return type:
- Returns:
The smoothed time series data.
- smooth_1d(array, filter_funcs)¶
Smooth a 1D array using a series of smoothing functions.
- Parameters:
array (
ndarray) – The input array.filter_funcs (
Iterable[SmoothingFunction]) – The smoothing functions to apply.
- Return type:
- Returns:
The smoothed array.