iracema.aggregation¶
Some aggregation methods for time series.
- 
iracema.aggregation.sliding_window(time_series, window_size, hop_size, function=None, window_name=None)[source]¶
- Use a sliding window to aggregate the data from - time_seriesby applying the- functionto each analysis window. The content of each window will be passed as the first argument to the function. Return the aggregated data in an array.- Parameters
- time_series (TimeSeries) – Time series over which the sliding operation must be applied. 
- window_size (int) – Size of the window. 
- hop_size (int) – Number of samples to be skipped between two successive windowing operations. 
- function (function) – Function to be applied to each window. If no function is specified, each window will contain an unaltered excerpt of the time series. 
- window_name (str) – Name of the window function to be used. Options are: {“boxcar”, “triang”, “blackman”, “hamming”, “hann”, “bartlett”, “flattop”, “parzen”, “bohman”, “blackmanharris”, “nuttall”, “barthann”, “no_window”, None}. 
 
 
- 
iracema.aggregation.aggregate_features(time_series, func)[source]¶
- Aggregate the features within each sample from - time_series.
- 
iracema.aggregation.aggregate_sucessive_samples(time_series, func, padding='zeros')[source]¶
- Aggregate consecutive samples in - time_series, and generate a new time series object.- Parameters
- time_series (TimeSeries) – 
- padding ({'zeros', 'same', 'ones'}) –