Utility functions¶
aeon
has a number of modules dedicated to utilities:
aeon.pipeline
, which contains functions for pipeline construction.aeon.testing
, which contains functions for estimator testing and data generation.aeon.utils
, which contains generic utility functions.
Pipeline¶
|
Create a pipeline from aeon and sklearn estimators. |
|
Coerces an sklearn estimator to the aeon pipeline interface. |
Testing¶
Data Generation¶
|
Randomly generate 3D numpy X and numpy y data for testing. |
|
Randomly generate 2D numpy X and numpy y for testing. |
|
Randomly generate 3D list of numpy X and numpy y for testing. |
|
Randomly generate 2D list of numpy X and numpy y for testing. |
|
Randomly generate list of DataFrame X and numpy y for testing. |
Randomly generate 2D DataFrame X and numpy y for testing. |
|
Randomly generate multi-index pd.DataFrame X and numpy y data for testing. |
|
|
Randomly generate 1D numpy X. |
|
Randomly generate 2D numpy X. |
|
Randomly generate pandas Series X. |
Randomly generate pandas DataFrame X. |
Estimator Checking¶
|
Check if estimator adheres to aeon conventions. |
|
Pytest specific decorator for parametrizing aeon estimator checks. |
Mock Estimators¶
Mock anomaly detector. |
|
Mock anomaly detector that requires fit. |
|
Mock anomaly detector that requires y. |
|
Mock classifier for testing fit/predict. |
|
Mock classifier for testing fit/predict/predict_proba. |
|
Mock classifier able to handle all input types. |
|
|
Mock classifier for testing fit/predict with multiple parameters. |
|
Mock classifier which contains another mock classfier. |
Mock Cluster for testing base class fit/predict. |
|
|
Mock Deep Clusterer for testing empty base deep class save utilities. |
BasecollectionTransformer for testing tags. |
|
Mock forecaster for testing. |
|
|
Dummy regressor for testing base class fit/predict. |
|
Dummy regressor for testing base class fit/predict/predict_proba. |
Mock segmenter for testing. |
|
Mock segmenter for testing. |
|
MockSeriesTransformer to set tags. |
|
|
MockSeriesTransformer adds a random value and a constant to the input series. |
MockSeriesTransformer adds a random value and a constant to the input series. |
|
|
MockSeriesTransformerNoFit adds a value to all elements the input series. |
|
Mock similarity search for testing base class predict. |
Utilities¶
|
Test two objects for equality in value. |
|
Redirects stdout and/or stderr to devnull. |
Utils¶
Data Conversion & Validation¶
|
Hierarchy of preference for internal supported types for equal length. |
|
Hierarchy of preference for internal supported types for unequal length. |
|
Convert from one of collections compatible data structure to another. |
|
Convert series y to the specified output_type. |
|
Check if x is of integer type, but not boolean. |
|
Check if x is of float type. |
|
Check if x is of timedelta type. |
Check if x is of pd.DateOffset type. |
|
Check if x is of timedelta or pd.DateOffset type. |
|
|
Check n_jobs parameter according to the scikit-learn convention. |
|
Validate window length. |
|
Return the number of cases in a collectiom. |
|
Get the string identifier associated with different data structures. |
Test if X contains equal length time series. |
|
|
Check if X has missing values. |
|
Check if X is multivariate. |
Check if series is univariate. |
|
Check if input is a single time series. |
|
|
Check X is a valid collection data structure. |
|
Check if input is a 2D table. |
Check to see if y is in a hierarchical dataframe. |
Numba¶
|
Numba unique value count function for a 1d numpy array. |
Numba first order differences function for a 1d numpy array. |
|
Numba first order differences function for a 2d numpy array. |
|
Numba first order differences function for a 3d numpy array. |
|
|
Numba series normalization function for a 1d numpy array with mean. |
Numba series normalization function for a 1d numpy array. |
|
Numba series normalization function for a 2d numpy array. |
|
Numba series normalization function for a 3d numpy array. |
|
|
Set the random seed for numba. |
|
Random choice function with log probability rather than uniform. |
|
Get a subsequence from a time series given a starting index. |
|
Get a subsequence, its mean and std from a time series given a starting index. |
|
Return the mean and standard deviation for all subsequence (l,d) in X. |
|
Return the unique pairs of the 2D array made by concatenating x and y. |
Numba slope derivative transformation for a 1d numpy array. |
|
Numba slope derivative transformation for a 2d numpy array. |
|
Numba slope derivative transformation for a 3d numpy array. |
|
|
Generate combination for n rows of k. |
|
Numba mean function for a 1d numpy array. |
|
Numba mean function for a 2d numpy array. |
Numba count above mean of first order differences for a 1d numpy array. |
|
Numba count above mean of first order differences for a 2d numpy array. |
|
Numba count above mean for a 1d numpy array. |
|
Numba count above mean for a 2d numpy array. |
|
|
Numba quantile function for a 1d numpy array. |
|
Numba quantile function for a 2d numpy array. |
|
Numba median function for a 1d numpy array. |
|
Numba median function for a 2d numpy array. |
|
Numba 0.25 quantile function for a 1d numpy array. |
Numba 0.25 quantile function for a 2d numpy array. |
|
|
Numba 0.75 quantile function for a 1d numpy array. |
Numba 0.75 quantile function for a 2d numpy array. |
|
|
Numba standard deviation function for a 1d numpy array. |
|
Numba standard deviation function for a 1d numpy array with pre-calculated mean. |
|
Numba standard deviation function for a 2d numpy array. |
|
Numba min function for a 1d numpy array. |
Numba min function for a 2d numpy array. |
|
|
Numba max function for a 1d numpy array. |
Numba max function for a 2d numpy array. |
|
|
Numba slope function for a 1d numpy array. |
|
Numba slope function for a 2d numpy array. |
|
Numba interquartile range function for a 1d numpy array. |
|
Numba interquartile range function for a 2d numpy array. |
|
Numba proportion of positive values function for a 1d numpy array. |
|
Numba proportion of positive values function for a 2d numpy array. |
|
Numba Fisher score function. |
|
Check if any number from 1 to n is a prime number and return the ones which are. |
|
Check if the input number is a prime number. |
Perform the discrete Haar wavelet transform on a given signal. |
|
|
Perform the multilevel discrete Haar wavelet transform on a given signal. |
Other¶
|
Print useful debugging information. |
|
Check whether obj is an sklearn estimator. |
|
Return sklearn identifier. |
Check whether obj is an sklearn transformer. |
|
Check whether obj is an sklearn classifier. |
|
|
Check whether obj is an sklearn regressor. |
|
Check whether obj is an sklearn clusterer. |
|
Split a time series into approximately equal intervals. |
|
Create sliding windows of a time series. |
|
Aggregate windowed results for each point of the original time series. |