timeeval.algorithms package¶
timeeval.algorithms.arima¶
- timeeval.algorithms.arima(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
ARIMA
Anomoly detector using ARIMA estimation and (default: euclidean) distance function to calculate prediction error as anomaly score
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- window_size: int
Size of sliding window (also used as prediction window size) (default:
20)- max_lag: int
Number of points, after which the ARIMA model is re-fitted to the data to deal with trends and shifts (default:
30000)- p_start: int
Minimum AR-order for the auto-ARIMA process (default:
1)- q_start: int
Minimum MA-order for the auto-ARIMA process (default:
1)- max_p: int
Maximum AR-order for the auto-ARIMA process (default:
5)- max_q: int
Maximum MA-order for the auto-ARIMA process (default:
5)- differencing_degree: int
Differencing degree for the auto-ARIMA process (default:
0)- distance_metric: enum[Euclidean,Mahalanobis,Garch,SSA,Fourier,DTW,EDRS,TWED]
Distance measure used to calculate the prediction error = anomaly score (default:
Euclidean)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the ARIMA algorithm.- Return type
timeeval.algorithms.autoencoder¶
- timeeval.algorithms.autoencoder(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
AutoEncoder (AE)
Implementation of https://dl.acm.org/doi/10.1145/2689746.2689747
Algorithm Parameters:
- latent_size: int
Dimensionality of the latent space (default:
32)- epochs: int
Number of training epochs (default:
10)- learning_rate: float
Learning rate (default:
0.005)- split: float
Fraction to split training data by for validation (default:
0.8)- early_stopping_delta: float
If loss is delta or less smaller for patience epochs, stop (default:
0.5)- early_stopping_patience: int
If loss is delta or less smaller for patience epochs, stop (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the AutoEncoder (AE) algorithm.- Return type
timeeval.algorithms.bagel¶
- timeeval.algorithms.bagel(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Bagel
Implementation of https://doi.org/10.1109/PCCC.2018.8710885
Algorithm Parameters:
- window_size: int
Size of sliding windows (default:
120)- latent_size: int
Dimensionality of encoding (default:
8)- hidden_layer_shape: List[int]
NN hidden layers structure (default:
[100, 100])- dropout: float
Rate of conditional dropout used (default:
0.1)- cuda: boolean
Use GPU for training (default:
False)- epochs: int
Number of passes over the entire dataset (default:
50)- batch_size: int
Batch size for input data (default:
128)- split: float
Fraction to split training data by for validation (default:
0.8)- early_stopping_delta: float
If loss is delta or less smaller for patience epochs, stop (default:
0.5)- early_stopping_patience: int
If loss is delta or less smaller for patience epochs, stop (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Bagel algorithm.- Return type
timeeval.algorithms.baseline_increasing¶
- timeeval.algorithms.baseline_increasing(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Increasing Baseline
Baseline that returns a score that steadily increases from 0 to 1
Algorithm Parameters:
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Increasing Baseline algorithm.- Return type
timeeval.algorithms.baseline_normal¶
- timeeval.algorithms.baseline_normal(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Normal Baseline
Baseline that returns a score of all zeros
Algorithm Parameters:
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Normal Baseline algorithm.- Return type
timeeval.algorithms.baseline_random¶
- timeeval.algorithms.baseline_random(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Random Baseline
Baseline that returns a random score between 0 and 1
Algorithm Parameters:
- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Random Baseline algorithm.- Return type
timeeval.algorithms.cblof¶
- timeeval.algorithms.cblof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
CBLOF
Implementation of https://doi.org/10.1016/S0167-8655(03)00003-5.
Algorithm Parameters:
- n_clusters: int
The number of clusters to form as well as the number of centroids to generate. (default:
8)- alpha: float
Coefficient for deciding small and large clusters. The ratio of the number of samples in large clusters to the number of samples in small clusters. (0.5 < alpha < 1) (default:
0.9)- beta: float
Coefficient for deciding small and large clusters. For a list sorted clusters by size |C1|, |C2|, …, |Cn|, beta = |Ck|/|Ck-1|. (1.0 < beta ) (default:
5)- use_weights: boolean
If set to True, the size of clusters are used as weights in outlier score calculation. (default:
false)- random_state: int
Seed for random number generation. (default:
42)- n_jobs: int
The number of parallel jobs to run for neighbors search. If -1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the CBLOF algorithm.- Return type
timeeval.algorithms.cof¶
- timeeval.algorithms.cof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
COF
Implementation of https://doi.org/10.1007/3-540-47887-6_53.
Algorithm Parameters:
- n_neighbors: int
Number of neighbors to use by default for k neighbors queries. Note that n_neighbors should be less than the number of samples. If n_neighbors is larger than the number of samples provided, all samples will be used. (default:
20)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the COF algorithm.- Return type
timeeval.algorithms.copod¶
- timeeval.algorithms.copod(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
COPOD
Implementation of https://publications.pik-potsdam.de/pubman/faces/ViewItemOverviewPage.jsp?itemId=item_24536.
Algorithm Parameters:
- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the COPOD algorithm.- Return type
timeeval.algorithms.dae¶
- timeeval.algorithms.dae(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DenoisingAutoEncoder (DAE)
Implementation of https://dl.acm.org/doi/10.1145/2689746.2689747
Algorithm Parameters:
- latent_size: int
Dimensionality of latent space (default:
32)- epochs: int
Number of training epochs (default:
10)- learning_rate: float
Learning rate (default:
0.005)- noise_ratio: float
Percentage of points that are converted to noise (0) during training (default:
0.1)- split: float
Fraction to split training data by for validation (default:
0.8)- early_stopping_delta: float
If loss is delta or less smaller for patience epochs, stop (default:
0.5)- early_stopping_patience: int
If loss is delta or less smaller for patience epochs, stop (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DenoisingAutoEncoder (DAE) algorithm.- Return type
timeeval.algorithms.damp¶
- timeeval.algorithms.damp(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DAMP
Implementation of https://www.cs.ucr.edu/~eamonn/DAMP_long_version.pdf
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding windows (default:
50)- n_init_train: int
Fraction of data used to warmup streaming. (default:
100)- max_lag: int
Maximum size to look back in time. (default:
None)- lookahead: int
Amount of steps to look into the future for deciding which future windows to skip analyzing. (default:
None)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DAMP algorithm.- Return type
timeeval.algorithms.dbstream¶
- timeeval.algorithms.dbstream(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DBStream
A simple density-based clustering algorithm that assigns data points to micro-clusters with a given radius and implements shared-density-based reclustering.
Algorithm Parameters:
- window_size: int
The length of the subsequences the dataset should be splitted in. (default:
20)- radius: float
The radius of micro-clusters. (default:
0.1)- lambda: float
The lambda used in the fading function. (default:
0.001)- distance_metric: enum[Euclidean,Manhattan,Maximum]
The metric used to calculate distances. If shared_density is TRUE this has to be Euclidian. (default:
Euclidean)- shared_density: boolean
Record shared density information. If set to TRUE then shared density is used for reclustering, otherwise reachability is used (overlapping clusters with less than r∗(1−alpha) distance are clustered together) (default:
True)- n_clusters: int
The number of macro clusters to be returned if macro is true. (default:
0)- alpha: float
For shared density: The minimum proportion of shared points between to clus-ters to warrant combining them (a suitable value for 2D data is .3). For reacha-bility clustering it is a distance factor (default:
0.1)- min_weight: float
The proportion of the total weight a macro-cluster needs to have not to be noise(between 0 and 1). (default:
0.0)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DBStream algorithm.- Return type
timeeval.algorithms.deepant¶
- timeeval.algorithms.deepant(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DeepAnT
Adapted community implementation (https://github.com/dev-aadarsh/DeepAnT)
Algorithm Parameters:
- epochs: int
Number of training epochs (default:
50)- window_size: int
History window: Number of time stamps in history, which are taken into account (default:
45)- prediction_window_size: int
Prediction window: Number of data points that will be predicted from each window (default:
1)- learning_rate: float
Learning rate (default:
1e-05)- batch_size: int
Batch size for input data (default:
45)- random_state: int
Seed for the random number generator (default:
42)- split: float
Train-validation split for early stopping (default:
0.8)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DeepAnT algorithm.- Return type
timeeval.algorithms.deepnap¶
- timeeval.algorithms.deepnap(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DeepNAP
Implementation of https://doi.org/10.1016/j.ins.2018.05.020
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding windows (default:
15)- partial_sequence_length: int
Number of points taken from the beginning of the predicted window used to build a partial sequence (with neighboring points) that is passed through another linear network. (default:
3)- lstm_layers: int
Number of LSTM layers within encoder and decoder (default:
2)- rnn_hidden_size: int
Number of neurons in LSTM hidden layer (default:
200)- dropout: float
Probability for a neuron to be zeroed for regularization (default:
0.5)- linear_hidden_size: int
Number of neurons in linear hidden layer (default:
100)- batch_size: int
Number of instances trained at the same time (default:
32)- validation_batch_size: int
Number of instances used for validation at the same time (default:
256)- epochs: int
Number of training iterations over entire dataset; recommended value: 256 (default:
1)- learning_rate: float
Learning rate for Adam optimizer (default:
0.001)- split: float
Train-validation split for early stopping (default:
0.8)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DeepNAP algorithm.- Return type
timeeval.algorithms.donut¶
- timeeval.algorithms.donut(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Donut
Implementation of https://doi.org/10.1145/3178876.3185996
Algorithm Parameters:
- window_size: int
Size of sliding windows (default:
120)- latent_size: int
Dimensionality of encoding (default:
5)- regularization: float
Factor for regularization in loss (default:
0.001)- linear_hidden_size: int
Size of linear hidden layer (default:
100)- epochs: int
Number of training passes over entire dataset (default:
256)- random_state: int
Seed for random number generation. (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Donut algorithm.- Return type
timeeval.algorithms.dspot¶
- timeeval.algorithms.dspot(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DSPOT
Implementation of https://doi.org/10.1145/3097983.3098144.
Algorithm Parameters:
- q: float
Main parameter: maximum probability of an abnormal event (default:
0.001)- n_init: int
Calibration: number of data used to calibrate algorithm. The user must ensure that n_init * (1 - level) > 10 (default:
1000)- level: float
Calibration: proportion of initial data (n_init) not involved in the tail distribution fit during initialization. The user must ensure that n_init * (1 - level) > 10 (default:
0.99)- up: boolean
Compute upper thresholds (default:
true)- down: boolean
Compute lower thresholds (default:
true)- alert: boolean
Enable alert triggering, if false, even out-of-bounds-data will be taken into account for tail fit (default:
true)- bounded: boolean
Performance: enable memory bounding (also improves performance) (default:
true)- max_excess: int
Performance: maximum number of data stored to perform the tail fit when memory bounding is enabled (default:
200)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DSPOT algorithm.- Return type
timeeval.algorithms.dwt_mlead¶
- timeeval.algorithms.dwt_mlead(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
DWT-MLEAD
Implementation of http://blogs.gm.fh-koeln.de/ciop/files/2019/01/thillwavelet.pdf.
Algorithm Parameters:
- start_level: int
First discrete wavelet decomposition level to consider (default:
3)- quantile_epsilon: float
Percentage of windows to flag as anomalous within each decomposition level’s coefficients (default:
0.01)- random_state: int
Seed for the random number generator (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the DWT-MLEAD algorithm.- Return type
timeeval.algorithms.eif¶
- timeeval.algorithms.eif(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Extended Isolation Forest (EIF)
Extenstion to the basic isolation forest. Implementation of https://doi.org/10.1109/TKDE.2019.2947676. Code from https://github.com/sahandha/eif
Algorithm Parameters:
- n_trees: int
The number of decision trees (base estimators) in the forest (ensemble). (default:
200)- max_samples: float
The number of samples to draw from X to train each base estimator: max_samples * X.shape[0]. If unspecified (null), then max_samples=min(256, X.shape[0]). (default:
None)- extension_level: int
Extension level 0 resembles standard isolation forest. If unspecified (null), then extension_level=X.shape[1] - 1. (default:
None)- limit: int
The maximum allowed tree depth. This is by default set to average length of unsucessful search in a binary tree. (default:
None)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Extended Isolation Forest (EIF) algorithm.- Return type
timeeval.algorithms.encdec_ad¶
- timeeval.algorithms.encdec_ad(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
EncDec-AD
Implementation of https://arxiv.org/pdf/1607.00148.pdf
Algorithm Parameters:
- lstm_layers: int
Number of LSTM layers within encoder and decoder (default:
1)- anomaly_window_size: int
Size of the sliding windows (default:
30)- latent_size: int
Size of the autoencoder’s latent space (embedding size) (default:
40)- batch_size: int
Number of instances trained at the same time (default:
32)- validation_batch_size: int
Number of instances used for validation at the same time (default:
128)- epochs: int
Number of training iterations over entire dataset (default:
50)- split: float
Train-validation split for early stopping (default:
0.9)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- learning_rate: float
Learning rate for Adam optimizer (default:
0.001)- random_state: int
Seed for the random number generator (default:
42)- window_size: int
Size of the sliding windows (default:
30)- test_batch_size: int
Number of instances used for testing at the same time (default:
128)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the EncDec-AD algorithm.- Return type
timeeval.algorithms.ensemble_gi¶
- timeeval.algorithms.ensemble_gi(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Ensemble GI
Implementation of https://doi.org/10.5441/002/edbt.2020.09
Algorithm Parameters:
- anomaly_window_size: int
The size of the sliding window, in which w regions are made discrete. (default:
50)- n_estimators: int
The number of models in the ensemble. (default:
10)- max_paa_transform_size: int
Maximum size of the embedding space used by PAA (SAX word size w) (default:
20)- max_alphabet_size: int
Maximum number of symbols used for discretization by SAX (lpha) (default:
10)- selectivity: float
The fraction of models in the ensemble included in the end result. (default:
0.8)- random_state: int
Seed for the random number generator (default:
42)- n_jobs: int
The number of parallel jobs to use for executing the models. If -1, then the number of jobs is set to the number of CPU cores. (default:
1)- window_method: enum[sliding,tumbling,orig]
Windowing method used to create subsequences. The original implementation had a strange method (orig) that is similar to tumbling, the paper uses a sliding window. However, sliding is significantly slower than tumbling while producing better results (higher anomaly score resolution). orig should not be used! (default:
sliding)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Ensemble GI algorithm.- Return type
timeeval.algorithms.fast_mcd¶
- timeeval.algorithms.fast_mcd(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Fast-MCD
Implementation of https://doi.org/10.2307/1270566
Algorithm Parameters:
- store_precision: boolean
Specify if the estimated precision is stored (default:
True)- support_fraction: float
The proportion of points to be included in the support of the raw MCD estimate. Default is None, which implies that the minimum value of support_fraction will be used within the algorithm: (n_sample + n_features + 1) / 2. The parameter must be in the range (0, 1). (default:
None)- random_state: int
Determines the pseudo random number generator for shuffling the data. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Fast-MCD algorithm.- Return type
timeeval.algorithms.fft¶
- timeeval.algorithms.fft(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
FFT
Implementation of https://dl.acm.org/doi/10.5555/1789574.1789615 proudly provided by members of the HPI AKITA project.
Algorithm Parameters:
- fft_parameters: int
Number of parameters to be used in IFFT for creating the fit. (default:
5)- context_window_size: int
Centered window of neighbors to consider for the calculation of local outliers’ z_scores (default:
21)- local_outlier_threshold: float
Outlier threshold in multiples of sigma for local outliers (default:
0.6)- max_anomaly_window_size: int
Maximum size of outlier regions. (default:
50)- max_sign_change_distance: int
Maximum gap between two closed oppositely signed local outliers to detect a sign change for outlier region grouping. (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the FFT algorithm.- Return type
timeeval.algorithms.generic_rf¶
- timeeval.algorithms.generic_rf(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Random Forest Regressor (RR)
A generic windowed forecasting method using random forest regression (requested by RollsRoyce). The forecasting error is used as anomaly score.
Algorithm Parameters:
- train_window_size: int
Size of the training windows. Always predicts a single point! (default:
50)- n_trees: int
The number of trees in the forest. (default:
100)- max_features_method: enum[auto,sqrt,log2]
The number of features to consider when looking for the best split between trees: ‘auto’: max_features=n_features, ‘sqrt’: max_features=sqrt(n_features), ‘log2’: max_features=log2(n_features). (default:
auto)- bootstrap: boolean
Whether bootstrap samples are used when building trees. If False, the whole dataset is used to build each tree. (default:
True)- max_samples: float
If bootstrap is True, the number of samples to draw from X to train each base estimator. (default:
None)- random_state: int
Seeds the randomness of the bootstrapping and the sampling of the features. (default:
42)- verbose: int
Controls logging verbosity. (default:
0)- n_jobs: int
The number of jobs to run in parallel. -1 means using all processors (default:
1)- max_depth: int
The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. (default:
None)- min_samples_split: int
The minimum number of samples required to split an internal node. (default:
2)- min_samples_leaf: int
The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least min_samples_leaf training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Random Forest Regressor (RR) algorithm.- Return type
timeeval.algorithms.generic_xgb¶
- timeeval.algorithms.generic_xgb(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
XGBoosting (RR)
A generic windowed forecasting method using XGBoost regression (requested by RollsRoyce). The forecasting error is used as anomaly score.
Algorithm Parameters:
- train_window_size: int
Size of the training windows. Always predicts a single point! (default:
50)- n_estimators: int
Number of gradient boosted trees. Equivalent to number of boosting rounds. (default:
100)- learning_rate: float
Boosting learning rate (xgb’s eta) (default:
0.1)- booster: enum[gbtree,gblinear,dart]
Booster to use (default:
gbtree)- tree_method: enum[auto,exact,approx,hist]
Tree method to use. Default to auto. If this parameter is set to default, XGBoost will choose the most conservative option available. exact is slowest, hist is fastest. Prefer hist and approx over exact, because for most datasets they have comparative quality, but are significantly faster. (default:
auto)- n_trees: int
If >1, then boosting random forests with n_trees trees. (default:
1)- max_depth: int
Maximum tree depth for base learners. (default:
None)- max_samples: float
Subsample ratio of the training instance. (default:
None)- colsample_bytree: float
Subsample ratio of columns when constructing each tree. (default:
None)- colsample_bylevel: float
Subsample ratio of columns for each level. (default:
None)- colsample_bynode: float
Subsample ratio of columns for each split. (default:
None)- random_state: int
Seeds the randomness of the bootstrapping and the sampling of the features. (default:
42)- verbose: int
Controls logging verbosity. (default:
0)- n_jobs: int
The number of jobs to run in parallel. -1 means using all processors. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the XGBoosting (RR) algorithm.- Return type
timeeval.algorithms.grammarviz3¶
- timeeval.algorithms.grammarviz3(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
GrammarViz
Implementation of https://doi.org/10.1145/3051126.
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding window. Equal to the discord length! (default:
170)- paa_transform_size: int
Size of the embedding space used by PAA (paper calls it number of frames or SAX word size w) (performance parameter) (default:
4)- alphabet_size: int
Number of symbols used for discretization by SAX (paper uses lpha) (performance parameter) (default:
4)- normalization_threshold: float
Threshold for Z-normalization of subsequences (windows). If variance of a window is higher than this threshold, it is normalized. (default:
0.01)- random_state: int
Seed for the random number generator (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the GrammarViz algorithm.- Return type
timeeval.algorithms.grammarviz3_multi¶
- timeeval.algorithms.grammarviz3_multi(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
GrammarViz-Multivariate
Multivariate extension of the GrammarViz3 algorithm.
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding window. Equal to the discord length! (default:
100)- output_mode: int
Algorithm to use for output [Density, Discord, Full] (default:
2)- multi_strategy: int
Strategy to handle multivariate output [Merge all, Merge clustered, All separate] (default:
1)- paa_transform_size: int
Size of the embedding space used by PAA (paper calls it number of frames or SAX word size w) (performance parameter) (default:
5)- alphabet_size: int
Number of symbols used for discretization by SAX (paper uses lpha) (performance parameter) (default:
6)- normalization_threshold: float
Threshold for Z-normalization of subsequences (windows). If variance of a window is higher than this threshold, it is normalized. (default:
0.01)- random_state: int
Seed for the random number generator (default:
42)- n_discords: int
Number of discords to report when using discord output strategy (default:
10)- numerosity_reduction: boolean
Disables / enables numerosity reduction strategy (default:
True)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the GrammarViz-Multivariate algorithm.- Return type
timeeval.algorithms.hbos¶
- timeeval.algorithms.hbos(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
HBOS
Implementation of https://citeseerx.ist.psu.edu/viewdoc/citations;jsessionid=2B4E3FB2BB07448253B4D45C3DAC2E95?doi=10.1.1.401.5686.
Algorithm Parameters:
- n_bins: int
The number of bins. (default:
10)- alpha: float
Regulizing alpha to prevent overflows. (default:
0.1)- bin_tol: float
Parameter to decide the flexibility while dealing with the samples falling outside the bins. (default:
0.5)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the HBOS algorithm.- Return type
timeeval.algorithms.health_esn¶
- timeeval.algorithms.health_esn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
HealthESN
Implementation of https://doi.org/10.1007/s00521-018-3747-z
Algorithm Parameters:
- linear_hidden_size: int
Hidden units in ESN reservoir. (default:
500)- prediction_window_size: int
Window of predicted points in the future. (default:
20)- connectivity: float
How dense the units in the reservoir are connected (= percentage of non-zero weights) (default:
0.25)- spectral_radius: float
Factor used for random initialization of ESN neural connections. (default:
0.6)- activation: enum[tanh,sigmoid]
Activation function used for the ESN. (default:
tanh)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the HealthESN algorithm.- Return type
timeeval.algorithms.hif¶
- timeeval.algorithms.hif(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Hybrid Isolation Forest (HIF)
Implementation of https://arxiv.org/abs/1705.03800
Algorithm Parameters:
- n_trees: int
The number of decision trees (base estimators) in the forest (ensemble). (default:
1024)- max_samples: float
The number of samples to draw from X to train each base estimator: max_samples * X.shape[0]. If unspecified (null), then max_samples=min(256, X.shape[0]). (default:
None)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Hybrid Isolation Forest (HIF) algorithm.- Return type
timeeval.algorithms.hotsax¶
- timeeval.algorithms.hotsax(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
HOT SAX
Implementation of https://doi.org/10.1109/ICDM.2005.79.
Algorithm Parameters:
- num_discords: int
The number of anomalies (discords) to search for in the time series. If not set, the scores for all discords are searched. (default:
None)- anomaly_window_size: int
Size of the sliding window. Equal to the discord length! (default:
100)- paa_transform_size: int
Size of the embedding space used by PAA (paper calls it number of frames or SAX word size w) (performance parameter) (default:
3)- alphabet_size: int
Number of symbols used for discretization by SAX (paper uses lpha) (performance parameter) (default:
3)- normalization_threshold: float
Threshold for Z-normalization of subsequences (windows). If variance of a window is higher than this threshold, it is normalized. (default:
0.01)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the HOT SAX algorithm.- Return type
timeeval.algorithms.hybrid_knn¶
- timeeval.algorithms.hybrid_knn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Hybrid KNN
Implementation of https://www.hindawi.com/journals/cin/2017/8501683/
Algorithm Parameters:
- linear_layer_shape: List[int]
NN structure with embedding dim as last value (default:
[100, 10])- split: float
train-validation split (default:
0.8)- anomaly_window_size: int
windowing size for time series (default:
20)- batch_size: int
number of simultaneously trained data instances (default:
64)- test_batch_size: int
number of simultaneously tested data instances (default:
256)- epochs: int
number of training iterations over entire dataset (default:
1)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- learning_rate: float
Gradient factor for backpropagation (default:
0.001)- n_neighbors: int
Defines which neighbour’s distance to use (default:
12)- n_estimators: int
Defines number of ensembles (default:
3)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Hybrid KNN algorithm.- Return type
timeeval.algorithms.if_lof¶
- timeeval.algorithms.if_lof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
IF-LOF
Isolation Forest - Local Outlier Factor: Uses a 3 step process - Building an isolation forest, pruning the forest with a computed treshhold, and applies local outlier factor to the resulting dataset
Algorithm Parameters:
- n_trees: int
Number of trees in isolation forest (default:
200)- max_samples: float
The number of samples to draw from X to train each tree: max_samples * X.shape[0]. If unspecified (null), then max_samples=min(256, X.shape[0]). (default:
None)- n_neighbors: int
Number neighbors to look at in local outlier factor calculation (default:
10)- alpha: float
Scalar that depends on consideration of the dataset and controls the amount of data to be pruned (default:
0.5)- m: int
m features with highest scores will be used for pruning (default:
None)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the IF-LOF algorithm.- Return type
timeeval.algorithms.iforest¶
- timeeval.algorithms.iforest(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Isolation Forest (iForest)
Implementation of https://doi.org/10.1145/2133360.2133363.
Algorithm Parameters:
- n_trees: int
The number of decision trees (base estimators) in the forest (ensemble). (default:
100)- max_samples: float
The number of samples to draw from X to train each base estimator: max_samples * X.shape[0]. If unspecified (null), then max_samples=min(256, n_samples). (default:
None)- max_features: float
The number of features to draw from X to train each base estimator: max_features * X.shape[1]. (default:
1.0)- bootstrap: boolean
If True, individual trees are fit on random subsets of the training data sampled with replacement. If False, sampling without replacement is performed. (default:
false)- random_state: int
Seed for random number generation. (default:
42)- verbose: int
Controls the verbosity of the tree building process logs. (default:
0)- n_jobs: int
The number of jobs to run in parallel. If -1, then the number of jobs is set to the number of cores. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Isolation Forest (iForest) algorithm.- Return type
timeeval.algorithms.img_embedding_cae¶
- timeeval.algorithms.img_embedding_cae(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
ImageEmbeddingCAE
Implementation of http://arxiv.org/abs/2009.02040
Algorithm Parameters:
- anomaly_window_size: int
length of one time series chunk (tumbling window) (default:
512)- kernel_size: int
width, height of each convolution kernel (stride is equal to this value) (default:
2)- num_kernels: int
number of convolution kernels used in each layer (default:
64)- latent_size: int
number of neurons used in the embedding layer (default:
100)- leaky_relu_alpha: float
alpha value used for leaky relu activation function (default:
0.03)- batch_size: int
number of simultaneously trained data instances (default:
32)- test_batch_size: int
number of simultaneously trained data instances (default:
128)- learning_rate: float
Gradient factor for backpropagation (default:
0.001)- epochs: int
number of training iterations over entire dataset (default:
30)- split: float
train-validation split (default:
0.8)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the ImageEmbeddingCAE algorithm.- Return type
timeeval.algorithms.kmeans¶
- timeeval.algorithms.kmeans(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
k-Means
Implementation of http://robotics.estec.esa.int/i-SAIRAS/isairas2001/papers/Paper_AS012.pdf
Algorithm Parameters:
- n_clusters: int
The number of clusters to form as well as the number of centroids to generate. The bigger n_clusters (k) is, the less noisy the anomaly scores are. (default:
20)- anomaly_window_size: int
Size of sliding windows. The bigger window_size is, the bigger the anomaly context is. If it’s to big, things seem anomalous that are not. If it’s too small, the algorithm is not able to find anomalous windows and looses its time context. (default:
20)- stride: int
Stride of sliding windows. It is the step size between windows. The larger stride is, the noisier the scores get. If stride == window_size, they are tumbling windows. (default:
1)- n_jobs: int
Internal parallelism used (sample-wise in the main loop which assigns each sample to its closest center). If -1 or None, all available CPUs are used. (default:
1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the k-Means algorithm.- Return type
timeeval.algorithms.knn¶
- timeeval.algorithms.knn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
KNN
Implementation of https://doi.org/10.1145/342009.335437.
Algorithm Parameters:
- n_neighbors: int
Number of neighbors to use by default for kneighbors queries. (default:
5)- leaf_size: int
Leaf size passed to BallTree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. (default:
30)- method: enum[largest,mean,median]
‘largest’: use the distance to the kth neighbor as the outlier score, ‘mean’: use the average of all k neighbors as the outlier score, ‘median’: use the median of the distance to k neighbors as the outlier score. (default:
largest)- radius: float
Range of parameter space to use by default for radius_neighbors queries. (default:
1.0)- distance_metric_order: int
Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. See http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances. (default:
2)- n_jobs: int
The number of parallel jobs to run for neighbors search. If
-1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the KNN algorithm.- Return type
timeeval.algorithms.laser_dbn¶
- timeeval.algorithms.laser_dbn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
LaserDBN
Implementation of https://doi.org/10.1007/978-3-662-53806-7_3
Algorithm Parameters:
- timesteps: int
Number of time steps the DBN builds probabilities for (min: 2) (default:
2)- n_bins: int
Number of bins used for discretization. (default:
10)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the LaserDBN algorithm.- Return type
timeeval.algorithms.left_stampi¶
- timeeval.algorithms.left_stampi(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Left STAMPi
Implementation of https://www.cs.ucr.edu/~eamonn/PID4481997_extend_Matrix%20Profile_I.pdf
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding windows (default:
50)- n_init_train: int
Fraction of data used to warmup streaming. (default:
100)- random_state: int
Seed for the random number generator (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Left STAMPi algorithm.- Return type
timeeval.algorithms.lof¶
- timeeval.algorithms.lof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
LOF
Implementation of https://doi.org/10.1145/342009.335388.
Algorithm Parameters:
- n_neighbors: int
Number of neighbors to use by default for kneighbors queries. If n_neighbors is larger than the number of samples provided, all samples will be used. (default:
20)- leaf_size: int
Leaf size passed to BallTree or KDTree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. (default:
30)- distance_metric_order: int
Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. See http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances. (default:
2)- n_jobs: int
The number of parallel jobs to run for neighbors search. If
-1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the LOF algorithm.- Return type
timeeval.algorithms.lstm_ad¶
- timeeval.algorithms.lstm_ad(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
LSTM-AD
Implementation of https://www.elen.ucl.ac.be/Proceedings/esann/esannpdf/es2015-56.pdf
Algorithm Parameters:
- lstm_layers: int
Number of stacked LSTM layers (default:
2)- split: float
Train-validation split for early stopping (default:
0.9)- window_size: int
(default:
30)- prediction_window_size: int
Number of points predicted (default:
1)- batch_size: int
Number of instances trained at the same time (default:
32)- validation_batch_size: int
Number of instances used for validation at the same time (default:
128)- epochs: int
Number of training iterations over entire dataset (default:
50)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- learning_rate: float
Learning rate for Adam optimizer (default:
0.001)- random_state: int
Seed for the random number generator (default:
42)- test_batch_size: int
Number of instances used for testing at the same time (default:
128)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the LSTM-AD algorithm.- Return type
timeeval.algorithms.lstm_vae¶
- timeeval.algorithms.lstm_vae(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
LSTM-VAE
self implementation of: https://ieeexplore.ieee.org/document/8279425
Algorithm Parameters:
- rnn_hidden_size: int
LTSM cells hidden dimension (default:
5)- latent_size: int
dimension of latent space (default:
5)- learning_rate: float
rate at which the gradients are updated (default:
0.001)- batch_size: int
size of batch given for each iteration (default:
32)- epochs: int
number of iterations we train the model (default:
10)- window_size: int
number of datapoints that the model takes once (default:
10)- lstm_layers: int
number of layers in lstm (default:
10)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the LSTM-VAE algorithm.- Return type
timeeval.algorithms.median_method¶
- timeeval.algorithms.median_method(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
MedianMethod
Implementation of https://doi.org/10.1007/s10115-006-0026-6
Algorithm Parameters:
- neighbourhood_size: int
Specifies the number of time steps to look forward and backward for each data point. (default:
100)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the MedianMethod algorithm.- Return type
timeeval.algorithms.mscred¶
- timeeval.algorithms.mscred(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
MSCRED
Implementation of https://doi.org/10.1609/aaai.v33i01.33011409
Algorithm Parameters:
- windows: List[int]
Number and size of different signature matrices (correlation matrices) to compute as a preprocessing step (default:
[10, 30, 60])- gap_time: int
Number of points to skip over between the generation of signature matrices (default:
10)- window_size: int
Size of the sliding windows (default:
5)- batch_size: int
Number of instances trained at the same time (default:
32)- learning_rate: float
Learning rate for Adam optimizer (default:
0.001)- epochs: int
Number of training iterations over entire dataset (default:
1)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- split: float
Train-validation split for early stopping (default:
0.8)- test_batch_size: int
Number of instances used for validation and testing at the same time (default:
256)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the MSCRED algorithm.- Return type
timeeval.algorithms.mstamp¶
- timeeval.algorithms.mstamp(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
mSTAMP
Implementation of http://www.cs.ucr.edu/%7Eeamonn/Motif_Discovery_ICDM.pdf
Algorithm Parameters:
- anomaly_window_size: int
Size of the sliding windows (default:
50)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the mSTAMP algorithm.- Return type
timeeval.algorithms.mtad_gat¶
- timeeval.algorithms.mtad_gat(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
MTAD-GAT
Implementation of http://arxiv.org/abs/2009.02040
Algorithm Parameters:
- mag_window_size: int
Window size for sliding window average calculation (default:
3)- score_window_size: int
Window size for anomaly scoring (default:
40)- threshold: float
Threshold for SR cleaning (default:
3)- context_window_size: int
Window for mean in SR cleaning (default:
5)- kernel_size: int
Kernel size for 1D-convolution (default:
7)- learning_rate: float
Learning rate for training (default:
0.001)- epochs: int
Number of times the algorithm trains on the dataset (default:
1)- batch_size: int
Number of data points propagated in parallel (default:
64)- window_size: int
Window size for windowing of Time Series (default:
20)- gamma: float
Importance factor for posterior in scoring (default:
0.8)- latent_size: int
Embedding size in VAE (default:
300)- linear_layer_shape: List[int]
Architecture of FC-NN (default:
[300, 300, 300])- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- split: float
Train-validation split for early stopping (default:
0.8)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the MTAD-GAT algorithm.- Return type
timeeval.algorithms.multi_hmm¶
- timeeval.algorithms.multi_hmm(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
MultiHMM
Implementation of https://doi.org/10.1016/j.asoc.2017.06.035
Algorithm Parameters:
- discretizer: enum[sugeno,choquet,fcm]
Available discretizers are “sugeno”, “choquet”, and “fcm”. If only 1 feature in time series, K-Bins discretizer is used. (default:
fcm)- n_bins: int
Number of bins used for discretization. (default:
10)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the MultiHMM algorithm.- Return type
timeeval.algorithms.multi_norma¶
- timeeval.algorithms.multi_norma(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
MultiNormA
Improved algorithm based on NorM (https://doi.org/10.1109/ICDE48307.2020.00182).
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- anomaly_window_size: int
Sliding window size used to create subsequences (equal to desired anomaly length) (default:
20)- normal_model_percentage: float
Percentage of (random) subsequences used to build the normal model. (default:
0.5)- max_motifs: int
Maximum number of used motifs. Important to avoid OOM errors. (default:
4096)- random_state: int
Seed for random number generation. (default:
42)- motif_detection: Enum[stomp,random,mixed]
Algorithm to use for motif detection [random, stomp, mixed]. (default:
mixed)- sum_dims: boolean
Sum all dimensions up before computing dists, otherwise each dim is handled seperately. (default:
False)- normalize_join: boolean
Apply join normalization heuristic. [false = no normalization, true = normalize] (default:
True)- join_combine_method: int
how to combine the join values from all dimensions.[0=sum, 1=max, 2=score dims (based on std, mean, range), 3=weight higher vals, 4=vals**channels] (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the MultiNormA algorithm.- Return type
timeeval.algorithms.multi_subsequence_lof¶
- timeeval.algorithms.multi_subsequence_lof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Multi-Sub-LOF
LOF on sliding windows of multivariate time series to detect subsequence anomalies.
Algorithm Parameters:
- window_size: int
Size of the sliding windows to extract subsequences as input to LOF. (default:
100)- n_neighbors: int
Number of neighbors to use by default for kneighbors queries. If n_neighbors is larger than the number of samples provided, all samples will be used. (default:
20)- leaf_size: int
Leaf size passed to BallTree or KDTree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. (default:
30)- distance_metric_order: int
Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. See http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances. (default:
2)- dim_aggregation_method: enum[concat,sum]
Method used to aggregate multiple dimensions, so that LOF can process the subsequence. When ‘concat’, the 2D-matrix is flattened into a 1D-vector; when ‘sum’ the 2D-matrix is aggregated over the channels to get a 1D sliding window. (default:
concat)- n_jobs: int
The number of parallel jobs to run for neighbors search. If
-1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Multi-Sub-LOF algorithm.- Return type
timeeval.algorithms.mvalmod¶
- timeeval.algorithms.mvalmod(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
mVALMOD
Implementation of https://doi.org/10.1007/s10618-020-00685-w summed up for every channel.
Algorithm Parameters:
- min_anomaly_window_size: Int
Minimum sliding window size (default:
30)- max_anomaly_window_size: Int
Maximum sliding window size (default:
40)- heap_size: Int
Size of the distance profile heap buffer (default:
50)- exclusion_zone: Float
Size of the exclusion zone as a factor of the window_size. This prevents self-matches. (default:
0.5)- verbose: Int
Controls logging verbosity. (default:
1)- random_state: Int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the mVALMOD algorithm.- Return type
timeeval.algorithms.norma¶
- timeeval.algorithms.norma(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
NormA
Improved algorithm based on NorM (https://doi.org/10.1109/ICDE48307.2020.00182).
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- anomaly_window_size: int
Sliding window size used to create subsequences (equal to desired anomaly length) (default:
20)- normal_model_percentage: float
Percentage of (random) subsequences used to build the normal model. (default:
0.5)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the NormA algorithm.- Return type
timeeval.algorithms.normalizing_flows¶
- timeeval.algorithms.normalizing_flows(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Normalizing Flows
Implementation of https://arxiv.org/abs/1912.09323
Algorithm Parameters:
- n_hidden_features_factor: float
Factor deciding how many hidden features for NFs are used based on number of features (default:
1.0)- hidden_layer_shape: List[int]
NN hidden layers structure (default:
[100, 100])- window_size: int
Window size of sliding window over time series (default:
20)- split: float
Train-validation split (default:
0.9)- epochs: int
Number of training epochs (default:
1)- batch_size: int
How many data instances are trained at the same time. (default:
64)- test_batch_size: int
How many data instances are tested at the same time. (default:
128)- teacher_epochs: int
Number of epochs for teacher NF training (default:
1)- distillation_iterations: int
Number of training steps for distillation (default:
1)- percentile: float
Percentile defining the tails for anomaly sampling. (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Normalizing Flows algorithm.- Return type
timeeval.algorithms.novelty_svr¶
- timeeval.algorithms.novelty_svr(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
NoveltySVR
Implementation of https://doi.org/10.1145/956750.956828.
Algorithm Parameters:
- n_init_train: int
Number of initial points to fit regression model on. For those points no score is calculated. (default:
500)- forgetting_time: int
If this is set, points older than forgetting_time are removed from the model (forgotten) (paper: W) (default:
None)- train_window_size: int
Size of training windows, also called embedding dimensions, used as context to predict the next point (paper: D) (default:
16)- anomaly_window_size: int
Size of event windows, also called event duration, for which suprising occurences are aggregated. Should not be chosen too large! (paper: n) (default:
6)- lower_suprise_bound: int
Number of suprising occurences that must be present within an event (see window_size) to regard the event as novel/anomalous (paper: h). Range: 0 < lower_suprise_bound < window_size. If not supplied ‘h = window_size / 2’ is used as default. (default:
None)- scaling: enum[null,standard,robust,power]
If the data should be scaled/normalized before regression using StandardScaler, RobustScaler, or PowerTransformer (Yeo-Johnson + standard scaling). See https://scikit-learn.org/stable/auto_examples/preprocessing/plot_all_scaling.html#sphx-glr-auto-examples-preprocessing-plot-all-scaling-py. (default:
standard)- epsilon: float
Specifies epsilon-tube to find suprising occurences in the prediction residuals (resid !> 2eps). Reused as Online SVR parameter: Epsilon in the epsilon-SVR model. It specifies the epsilon-tube within which no penalty is associated in the training loss function with points predicted within a distance epsilon from the actual value. (default:
0.1)- verbose: int
Controls verbose output. Higher values mean more detailled output [0; 5]. Verbose output of the Online SVR appears not until >=3. (default:
0)- C: float
Online SVR parameter: Penalty parameter C of the error term. (default:
1.0)- kernel: enum[linear,poly,rbf,sigmoid,rbf-gaussian,rbf-exp]
Online SVR parameter: Specifies the kernel type to be used in the algorithm. (default:
rbf)- degree: int
Online SVR parameter: Degree of the polynomial kernel function (‘poly’). Ignored by all other kernels. (default:
3)- gamma: float
Online SVR parameter: Kernel coefficient for ‘poly’, ‘sigmoid’, and ‘rbf’-kernels. If gamma is None then 1/n_features will be used instead. (default:
None)- coef0: float
Online SVR parameter: Independent term in kernel function. It is only significant in ‘poly’ and ‘sigmoid’. (default:
0.0)- tol: float
Online SVR parameter: Tolerance for stopping criterion. (default:
0.001)- stabilized: boolean
Online SVR parameter: If stabilization should be used. (default:
true)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the NoveltySVR algorithm.- Return type
timeeval.algorithms.numenta_htm¶
- timeeval.algorithms.numenta_htm(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
NumentaHTM
Implementation of https://doi.org/10.1016/j.neucom.2017.04.070
Algorithm Parameters:
- encoding_input_width: int
(default:
21)- encoding_output_width: int
(default:
50)- autoDetectWaitRecords: int
(default:
50)- columnCount: int
Number of cell columns in the cortical region (same number for SP and TM) (default:
2048)- numActiveColumnsPerInhArea: int
Maximum number of active columns in the SP region’s output (when there are more, the weaker ones are suppressed) (default:
40)- potentialPct: float
What percent of the columns’s receptive field is available for potential synapses. At initialization time, we will choose potentialPct * (2*potentialRadius+1)^2 (default:
0.5)- synPermConnected: float
The default connected threshold. Any synapse whose permanence value is above the connected threshold is a “connected synapse”, meaning it can contribute to the cell’s firing. Typical value is 0.10. Cells whose activity level before inhibition falls below minDutyCycleBeforeInh will have their own internal synPermConnectedCell threshold set below this default value. (default:
0.1)- synPermActiveInc: float
(default:
0.1)- synPermInactiveDec: float
(default:
0.005)- cellsPerColumn: int
The number of cells (i.e., states), allocated per column. (default:
32)- inputWidth: int
(default:
2048)- newSynapseCount: int
New Synapse formation count (default:
20)- maxSynapsesPerSegment: int
Maximum number of synapses per segment (default:
32)- maxSegmentsPerCell: int
Maximum number of segments per cell (default:
128)- initialPerm: float
Initial Permanence (default:
0.21)- permanenceInc: float
Permanence Increment (default:
0.1)- permanenceDec: float
Permanence Decrement (default:
0.1)- globalDecay: float
(default:
0.0)- maxAge: int
(default:
0)- minThreshold: int
Minimum number of active synapses for a segment to be considered during search for the best-matching segments. (default:
9)- activationThreshold: int
Segment activation threshold. A segment is active if it has >= tpSegmentActivationThreshold connected synapses that are active due to infActiveState (default:
12)- pamLength: int
“Pay Attention Mode” length. This tells the TM how many new elements to append to the end of a learned sequence at a time. Smaller values are better for datasets with short sequences, higher values are better for datasets with long sequences. (default:
1)- alpha: float
This controls how fast the classifier learns/forgets. Higher values make it adapt faster and forget older patterns faster (default:
0.5)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the NumentaHTM algorithm.- Return type
timeeval.algorithms.ocean_wnn¶
- timeeval.algorithms.ocean_wnn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
OceanWNN
Implementation of https://doi.org/10.1016/j.oceaneng.2019.106129
Algorithm Parameters:
- train_window_size: int
Window size used for forecasting the next point (default:
20)- hidden_size: int
Number of neurons in hidden layer (default:
20)- batch_size: int
Number of instances trained at the same time (default:
64)- test_batch_size: int
Batch size over test and validation dataset (default:
256)- epochs: int
Number of training iterations over entire dataset; recommended value: 1000 (default:
1)- split: float
Train-validation split for early stopping (default:
0.8)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- learning_rate: float
Learning rate for Adam optimizer (default:
0.01)- wavelet_a: float
WBF scale parameter; recommended range: [-2.5, 2.5] (default:
-2.5)- wavelet_k: float
WBF shift parameter; recommended range: [-1.5, 1.5] (default:
-1.5)- wavelet_wbf: enum[mexican_hat,central_symmetric,morlet]
Mother WBF; allowed values: “mexican_hat”, “central_symmetric”, “morlet” (default:
mexican_hat)- wavelet_cs_C: float
Cosine factor for central-symmetric WBF. (default:
1.75)- threshold_percentile: float
Upper percentile of training residual distribution used for detection replacement. (default:
0.99)- random_state: int
Seed for the random number generator (default:
42)- with_threshold: boolean
If true, values whose forecasting error exceeds the threshold are not included in next window, but are replaced by the prediction. (default:
true)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the OceanWNN algorithm.- Return type
timeeval.algorithms.omnianomaly¶
- timeeval.algorithms.omnianomaly(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
OmniAnomaly
Implementation of https://doi.org/10.1145/3292500.3330672
Algorithm Parameters:
- latent_size: int
Reduced dimension size (default:
3)- rnn_hidden_size: int
Size of RNN hidden layer (default:
500)- window_size: int
Sliding window size (default:
100)- linear_hidden_size: int
Dense layer size (default:
500)- nf_layers: int
NF layer size (default:
20)- epochs: int
Number of training passes over entire dataset (default:
10)- split: float
Train-validation split (default:
0.8)- batch_size: int
Number of datapoints fitted parallel (default:
50)- l2_reg: float
Regularization factor (default:
0.0001)- learning_rate: float
Learning Rate for Adam Optimizer (default:
0.001)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the OmniAnomaly algorithm.- Return type
timeeval.algorithms.pcc¶
- timeeval.algorithms.pcc(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
PCC
Implementation of http://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=003008C2CF2373B9C332D4A1DB035515?doi=10.1.1.66.299.
Algorithm Parameters:
- n_components: int
Number of components to keep. If n_components is not set all components are kept: n_components == min(n_samples, n_features). (default:
None)- n_selected_components: int
Number of selected principal components for calculating the outlier scores. It is not necessarily equal to the total number of the principal components. If not set, use all principal components. (default:
None)- whiten: boolean
When True the components_ vectors are multiplied by the square root of n_samples and then divided by the singular values to ensure uncorrelated outputs with unit component-wise variances. Whitening will remove some information from the transformed signal (the relative variance scales of the components) but can sometime improve the predictive accuracy of the downstream estimators by making their data respect some hard-wired assumptions. (default:
false)- svd_solver: enum[auto,full,arpack,randomized]
‘auto’: the solver is selected by a default policy based on X.shape and n_components. If the input data is larger than 500x500 and the number of components to extract is lower than 80% of the smallest dimension of the data, then the more efficient ‘randomized’ method is enabled. Otherwise the exact full SVD is computed and optionally truncated afterwards. ‘full’: run exact full SVD calling the standard LAPACK solver via scipy.linalg.svd and select the components by postprocessing. ‘arpack’: run SVD truncated to n_components calling ARPACK solver via scipy.sparse.linalg.svds. It requires strictly 0 < n_components < X.shape[1]. ‘randomized’: run randomized SVD by the method of Halko et al. (default:
auto)- tol: float
Tolerance for singular values computed by svd_solver == ‘arpack’. (default:
0.0)- max_iter: int
Number of iterations for the power method computed by svd_solver == ‘randomized’. (default:
None)- random_state: int
Used when svd_solver == ‘arpack’ or svd_solver == ‘randomized’ to seed random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the PCC algorithm.- Return type
timeeval.algorithms.pci¶
- timeeval.algorithms.pci(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
PCI
Implementation of https://doi.org/10.1155/2014/879736
Algorithm Parameters:
- window_size: int
The algorithm uses windows around the current points to predict that point (k points before and k after, where k = window_size // 2). The difference between real and predicted value is used as anomaly score. The parameter window_size acts as a kind of smoothing factor. The bigger the window_size, the smoother the predictions, the more values have big errors. If window_size is too small, anomalies might not be found. window_size should correlate with anomaly window sizes. (default:
20)- thresholding_p: float
This parameter is only needed if the algorithm should decide itself whether a point is an anomaly. It treats p as a confidence coefficient. It’s the t-statistics confidence coefficient. The smaller p is, the bigger is the confidence interval. If p is too small, anomalies might not be found. If p is too big, too many points might be labeled anomalous. (default:
0.05)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the PCI algorithm.- Return type
timeeval.algorithms.phasespace_svm¶
- timeeval.algorithms.phasespace_svm(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
PhaseSpace-SVM
Implementation of https://doi.org/10.1109/IJCNN.2003.1223670.
Algorithm Parameters:
- embed_dim_range: List[int]
List of phase space dimensions (sliding window sizes). For each dimension a OC-SVM is fitted to calculate outlier scores. The final result is the point-wise aggregation of the anomaly scores. (default:
[50, 100, 150])- project_phasespace: boolean
Whether to use phasespace projection or just work on the phasespace values. (default:
False)- nu: float
Main parameter of OC-SVM. An upper bound on the fraction of training errors and a lower bound of the fraction of support vectors. Should be in the interval (0, 1]. (default:
0.5)- kernel: enum[linear,poly,rbf,sigmoid]
Specifies the kernel type to be used in the algorithm. It must be one of ‘linear’, ‘poly’, ‘rbf’, or ‘sigmoid’. (default:
rbf)- gamma: float
Kernel coefficient for ‘rbf’, ‘poly’ and ‘sigmoid’. If gamma is not set (null) then it uses 1 / (n_features * X.var()) as value of gamma (default:
None)- degree: int
Degree of the polynomial kernel function (‘poly’). Ignored by all other kernels. (default:
3)- coef0: float
Independent term in kernel function. It is only significant in ‘poly’ and ‘sigmoid’. (default:
0.0)- tol: float
Tolerance for stopping criterion. (default:
0.001)- random_state: int
Seed for random number generation. (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the PhaseSpace-SVM algorithm.- Return type
timeeval.algorithms.pst¶
- timeeval.algorithms.pst(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
PST
Implementation of a modified version (with preceding discretization) of https://doi.org/10.1137/1.9781611972764.9.
Algorithm Parameters:
- window_size: int
Length of the subsequences in which the time series should be splitted into (sliding window). (default:
5)- max_depth: int
Maximal depth of the PST. Default to maximum length of the sequence(s) in object minus 1. (default:
4)- n_min: int
Minimum number of occurences of a string to add it in the tree. (default:
1)- y_min: float
Smoothing parameter for conditional probabilities, assuring that nosymbol, and hence no sequence, is predicted to have a null probability. The parameter $ymin$ sets a lower bound for a symbol’s probability. (default:
None)- n_bins: int
Number of Bags (bins) in which the time-series should be splitted by frequency. (default:
5)- sim: enum[SIMo,SIMn]
The similarity measure to use when computing the similarity between a sequence and the pst. SIMn is supposed to yield better results. (default:
SIMn)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the PST algorithm.- Return type
timeeval.algorithms.random_black_forest¶
- timeeval.algorithms.random_black_forest(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Random Black Forest (RR)
An ensemble of multiple multi-output random forest regressors based on different feature subsets (requested by RollsRoyce). The forecasting error is used as anomaly score.
Algorithm Parameters:
- train_window_size: int
Size of the training windows. Always predicts a single point! (default:
50)- n_estimators: int
The number of forests. Each forest is trained on max_features features. (default:
2)- max_features_per_estimator: float
Each forest is trained on randomly selected int(max_features * n_features) features. (default:
0.5)- n_trees: int
The number of trees in the forest. (default:
100)- max_features_method: enum[auto,sqrt,log2]
The number of features to consider when looking for the best split between trees: ‘auto’: max_features=n_features, ‘sqrt’: max_features=sqrt(n_features), ‘log2’: max_features=log2(n_features). (default:
auto)- bootstrap: boolean
Whether bootstrap samples are used when building trees. If False, the whole dataset is used to build each tree. (default:
True)- max_samples: float
If bootstrap is True, the number of samples to draw from X to train each base estimator. (default:
None)- random_state: int
Seeds the randomness of the bootstrapping and the sampling of the features. (default:
42)- verbose: int
Controls logging verbosity. (default:
0)- n_jobs: int
The number of jobs to run in parallel. -1 means using all processors (default:
1)- max_depth: int
The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. (default:
None)- min_samples_split: int
The minimum number of samples required to split an internal node. (default:
2)- min_samples_leaf: int
The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least min_samples_leaf training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Random Black Forest (RR) algorithm.- Return type
timeeval.algorithms.robust_pca¶
- timeeval.algorithms.robust_pca(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
RobustPCA
Implementation of https://arxiv.org/pdf/1801.01571.pdf
Algorithm Parameters:
- max_iter: int
Defines the number of maximum robust PCA iterations for solving matrix decomposition. (default:
1000)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the RobustPCA algorithm.- Return type
timeeval.algorithms.s_h_esd¶
- timeeval.algorithms.s_h_esd(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
S-H-ESD (Twitter)
Implementation of http://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=003008C2CF2373B9C332D4A1DB035515?doi=10.1.1.66.299
Algorithm Parameters:
- max_anomalies: float
expected maximum relative frequency of anomalies in the dataset (default:
0.05)- timestamp_unit: enum[m,h,d]
If the index column (‘timestamp’) is of type integer, this gives the unit for date conversion. A unit less than seconds is not supported by S-H-ESD! (default:
m)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the S-H-ESD (Twitter) algorithm.- Return type
timeeval.algorithms.sand¶
- timeeval.algorithms.sand(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
SAND
Implementation of SAND described in http://www.vldb.org/pvldb/vol14/p1717-boniol.pdf.
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- anomaly_window_size: int
Size of the anomalous pattern; sliding windows for clustering and preprocessing are of size 3*anomaly_window_size. (default:
75)- n_clusters: int
Number of clusters used in Kshape that are maintained iteratively as a normal model (default:
6)- n_init_train: int
Number of points to build the initial model (may contain anomalies) (default:
2000)- iter_batch_size: int
Number of points for each batch. Mostly impacts performance (not too small). (default:
500)- alpha: float
Weight decay / forgetting factor. Quite robust (default:
0.5)- random_state: int
Seed for random number generation. (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the SAND algorithm.- Return type
timeeval.algorithms.sarima¶
- timeeval.algorithms.sarima(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
SARIMA
Implementation of SARIMA method described in https://milets18.github.io/papers/milets18_paper_19.pdf.
Algorithm Parameters:
- train_window_size: int
Number of points from the beginning of the series to build model on. (default:
500)- prediction_window_size: int
Number of points to forecast in one go; smaller = slower, but more accurate. (default:
10)- max_lag: int
Refit SARIMA model after that number of points (only helpful if fixed_orders=None) (default:
None)- period: int
Periodicity (number of periods in season), often it is 4 for quarterly data or 12 for monthly data. Default is no seasonal effect (==1). Must be >= 1. (default:
1)- max_iter: int
The maximum number of function evaluations. smaller = faster, but might not converge. (default:
20)- exhaustive_search: boolean
Performs full grid search to find optimal SARIMA-model without considering statistical tests on the data –> SLOW! but finds the optimal model. (default:
false)- n_jobs: int
The number of parallel jobs to run for grid search. If
-1, then the number of jobs is set to the number of CPU cores. (default:1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the SARIMA algorithm.- Return type
timeeval.algorithms.series2graph¶
- timeeval.algorithms.series2graph(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Series2Graph
Implementation of https://doi.org/10.14778/3407790.3407792.
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- window_size: Int
Size of the sliding window (paper: l), independent of anomaly length, but should in the best case be larger. (default:
50)- query_window_size: Int
Size of the sliding windows used to find anomalies (query subsequences). query_window_size must be >= window_size! (paper: l_q) (default:
75)- rate: Int
Number of angles used to extract pattern nodes. A higher value will lead to high precision, but at the cost of increased computation time. (paper: r performance parameter) (default:
30)- random_state: Int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Series2Graph algorithm.- Return type
timeeval.algorithms.sr¶
- timeeval.algorithms.sr(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Spectral Residual (SR)
Implementation of https://doi.org/10.1145/3292500.3330680
Algorithm Parameters:
- mag_window_size: int
Window size for sliding window average calculation (default:
3)- score_window_size: int
Window size for anomaly scoring (default:
40)- window_size: int
Sliding window size (default:
50)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Spectral Residual (SR) algorithm.- Return type
timeeval.algorithms.sr_cnn¶
- timeeval.algorithms.sr_cnn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
SR-CNN
Implementation of https://doi.org/10.1145/3292500.3330680
Algorithm Parameters:
- window_size: int
Sliding window size (default:
128)- random_state: int
Seed for random number generators (default:
42)- step: int
stride size for training data generation (default:
64)- num: int
Max value for generated data (default:
10)- learning_rate: float
Gradient factor during SGD training (default:
1e-06)- epochs: int
Number of training passes over entire dataset (default:
1)- batch_size: int
Number of data points trained in parallel (default:
256)- n_jobs: int
Number of processes used during training (default:
1)- split: float
Train-validation split for early stopping (default:
0.9)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the SR-CNN algorithm.- Return type
timeeval.algorithms.ssa¶
- timeeval.algorithms.ssa(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
SSA
Segmented Sequence Analysis calculates two piecewise linear models, aligns them and then computes the similarity between them. Finally a treshhold based approach is used to classify data as anomalous.
Warning
The implementation of this algorithm is not publicly available (closed source). Thus, TimeEval will fail to download the Docker image and the algorithm will not be available. Please contact the authors of the algorithm for the implementation and build the algorithm Docker image yourself.
Algorithm Parameters:
- ep: int
Score normalization value (default:
3)- window_size: int
Size of sliding window. (default:
20)- rf_method: Enum[all,alpha]
all: Directly calculate reference timeseries from all points. alpha: Create weighted reference timeseries with help of parameter ‘a’ (default:
alpha)- alpha: float
Describes weights that are used for reference time series creation. Can be a single weight(float) or an array of weights. So far only supporting a single value (default:
0.2)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the SSA algorithm.- Return type
timeeval.algorithms.stamp¶
- timeeval.algorithms.stamp(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
STAMP
Implementation of https://doi.org/10.1109/ICDM.2016.0179.
Algorithm Parameters:
- anomaly_window_size: Int
Size of the sliding window. (default:
30)- exclusion_zone: Float
Size of the exclusion zone as a factor of the window_size. This prevents self-matches. (default:
0.5)- verbose: Int
Controls logging verbosity. (default:
1)- n_jobs: Int
The number of jobs to run in parallel. -1 is not supported, defaults back to serial implementation. (default:
1)- random_state: Int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the STAMP algorithm.- Return type
timeeval.algorithms.stomp¶
- timeeval.algorithms.stomp(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
STOMP
Implementation of https://doi.org/10.1109/ICDM.2016.0085.
Algorithm Parameters:
- anomaly_window_size: Int
Size of the sliding window. (default:
30)- exclusion_zone: Float
Size of the exclusion zone as a factor of the window_size. This prevents self-matches. (default:
0.5)- verbose: Int
Controls logging verbosity. (default:
1)- n_jobs: Int
The number of jobs to run in parallel. -1 is not supported, defaults back to serial implementation. (default:
1)- random_state: Int
Seed for random number generation. (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the STOMP algorithm.- Return type
timeeval.algorithms.subsequence_fast_mcd¶
- timeeval.algorithms.subsequence_fast_mcd(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Subsequence Fast-MCD
Implementation of https://doi.org/10.2307/1270566 with sliding windows as input
Algorithm Parameters:
- store_precision: boolean
Specify if the estimated precision is stored (default:
True)- support_fraction: float
The proportion of points to be included in the support of the raw MCD estimate. Default is None, which implies that the minimum value of support_fraction will be used within the algorithm: (n_sample + n_features + 1) / 2. The parameter must be in the range (0, 1). (default:
None)- random_state: int
Determines the pseudo random number generator for shuffling the data. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Subsequence Fast-MCD algorithm.- Return type
timeeval.algorithms.subsequence_if¶
- timeeval.algorithms.subsequence_if(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Subsequence IF
Isolation Forest on sliding windows to detect subsequence anomalies.
Algorithm Parameters:
- window_size: int
Size of the sliding windows to extract subsequences as input to LOF. (default:
100)- n_trees: int
The number of decision trees (base estimators) in the forest (ensemble). (default:
100)- max_samples: float
The number of samples to draw from X to train each base estimator: max_samples * X.shape[0]. If unspecified (null), then max_samples=min(256, n_samples). (default:
None)- max_features: float
The number of features to draw from X to train each base estimator: max_features * X.shape[1]. (default:
1.0)- bootstrap: boolean
If True, individual trees are fit on random subsets of the training data sampled with replacement. If False, sampling without replacement is performed. (default:
false)- random_state: int
Seed for random number generation. (default:
42)- verbose: int
Controls the verbosity of the tree building process logs. (default:
0)- n_jobs: int
The number of jobs to run in parallel. If -1, then the number of jobs is set to the number of cores. (default:
1)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Subsequence IF algorithm.- Return type
timeeval.algorithms.subsequence_knn¶
- timeeval.algorithms.subsequence_knn(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Sub-KNN
KNN on sliding windows to detect subsequence anomalies.
Algorithm Parameters:
- window_size: int
Size of the sliding windows to extract subsequences as input to LOF. (default:
100)- n_neighbors: int
Number of neighbors to use by default for kneighbors queries. (default:
5)- leaf_size: int
Leaf size passed to BallTree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. (default:
30)- method: enum[largest,mean,median]
‘largest’: use the distance to the kth neighbor as the outlier score, ‘mean’: use the average of all k neighbors as the outlier score, ‘median’: use the median of the distance to k neighbors as the outlier score. (default:
largest)- radius: float
Range of parameter space to use by default for radius_neighbors queries. (default:
1.0)- distance_metric_order: int
Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. See http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances. (default:
2)- n_jobs: int
The number of parallel jobs to run for neighbors search. If
-1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:1)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Sub-KNN algorithm.- Return type
timeeval.algorithms.subsequence_lof¶
- timeeval.algorithms.subsequence_lof(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Subsequence LOF
LOF on sliding windows to detect subsequence anomalies.
Algorithm Parameters:
- window_size: int
Size of the sliding windows to extract subsequences as input to LOF. (default:
100)- n_neighbors: int
Number of neighbors to use by default for kneighbors queries. If n_neighbors is larger than the number of samples provided, all samples will be used. (default:
20)- leaf_size: int
Leaf size passed to BallTree or KDTree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. (default:
30)- distance_metric_order: int
Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. See http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.pairwise_distances. (default:
2)- n_jobs: int
The number of parallel jobs to run for neighbors search. If
-1, then the number of jobs is set to the number of CPU cores. Affects only kneighbors and kneighbors_graph methods. (default:1)- random_state: int
Seed for random number generation. (default:
42)- use_column_index: int
The column index to use as input for the univariate algorithm for multivariate datasets. The selected single channel of the multivariate time series is analyzed by the algorithms. The index is 0-based and does not include the index-column (‘timestamp’). The single channel of an univariate dataset, therefore, has index 0. (default:
0)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Subsequence LOF algorithm.- Return type
timeeval.algorithms.tanogan¶
- timeeval.algorithms.tanogan(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
TAnoGan
Implementation of http://arxiv.org/abs/2008.09567
Algorithm Parameters:
- epochs: int
Number of training iterations over entire dataset (default:
1)- cuda: boolean
Set to true, if the GPU-backend (using CUDA) should be used. Otherwise, the algorithm is executed on the CPU. (default:
false)- window_size: int
Size of the sliding windows (default:
30)- learning_rate: float
Learning rate for Adam optimizer (default:
0.0002)- batch_size: int
Number of instances trained at the same time (default:
32)- n_jobs: int
Number of workers (processes) used to load and preprocess the data (default:
1)- random_state: int
Seed for random number generation. (default:
42)- early_stopping_patience: int
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
10)- early_stopping_delta: float
If 1 - (loss / last_loss) is less than delta for patience epochs, stop (default:
0.05)- split: float
Train-validation split for early stopping (default:
0.8)- iterations: int
Number of test iterations per window (default:
25)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the TAnoGan algorithm.- Return type
timeeval.algorithms.tarzan¶
- timeeval.algorithms.tarzan(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
TARZAN
Implementation of https://dl.acm.org/doi/10.1145/775047.775128
Algorithm Parameters:
- random_state: int
Seed for random number generation. (default:
42)- anomaly_window_size: int
Size of the sliding window. Equal to the discord length! (default:
20)- alphabet_size: int
Number of symbols used for discretization by SAX (performance parameter) (default:
4)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the TARZAN algorithm.- Return type
timeeval.algorithms.telemanom¶
- timeeval.algorithms.telemanom(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Telemanom
Implementation of https://doi.org/10.1145/3219819.3219845.
Algorithm Parameters:
- batch_size: Int
number of values to evaluate in each batch (default:
70)- smoothing_window_size: Int
number of trailing batches to use in error calculation (default:
30)- smoothing_perc: Float
etermines window size used in EWMA smoothing (percentage of total values for channel) (default:
0.05)- error_buffer: Int
number of values surrounding an error that are brought into the sequence (promotes grouping on nearby sequences) (default:
100)- dropout: Float
LSTM dropout probability (default:
0.3)- lstm_batch_size: Int
number of vlaues to evaluate in one batch for the LSTM (default:
64)- epochs: Int
Number of training iterations over entire dataset (default:
35)- split: Float
Train-validation split for early stopping (default:
0.8)- early_stopping_patience: Int
If loss is delta or less smaller for patience epochs, stop (default:
10)- early_stopping_delta: Float
If loss is delta or less smaller for patience epochs, stop (default:
0.0003)- window_size: Int
num previous timesteps provided to model to predict future values (default:
250)- prediction_window_size: Int
number of steps to predict ahead (default:
10)- p: Float
minimum percent decrease between max errors in anomalous sequences (used for pruning) (default:
0.13)- random_state: int
Seed for the random number generator (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Telemanom algorithm.- Return type
timeeval.algorithms.torsk¶
- timeeval.algorithms.torsk(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Torsk
Implementation of http://arxiv.org/abs/1909.01709
Algorithm Parameters:
- input_map_size: int
Size of the random weight preprocessing latent space. input_map_size must be larger than or equal to context_window_size! (default:
100)- input_map_scale: float
Feature scaling of the random weight preprocessing. (default:
0.125)- context_window_size: int
Size of a tumbling window used to encode the time series into a 2D (image-based) representation, called slices (default:
10)- train_window_size: int
Torsk creates the input subsequences by sliding a window of size train_window_size + prediction_window_size + 1 over the slices with shape (context_window_size, dim). train_window_size represents the size of the input windows for training and prediction (default:
50)- prediction_window_size: int
Torsk creates the input subsequences by sliding a window of size train_window_size + prediction_window_size + 1 over the slices with shape (context_window_size, dim). prediction_window_size represents the size of the ESN predictions, should be min_anomaly_length < prediction_window_size < 10 * min_anomaly_length (default:
20)- transient_window_size: int
Just a part of the training window, the first transient_window_size slices, are used for the ESN optimization. (default:
10)- spectral_radius: float
ESN hyperparameter that determines the influence of previous internal ESN state on the next one. spectral_radius > 1.0 increases non-linearity, but decreases short-term-memory capacity (maximized at 1.0) (default:
2.0)- density: float
Density of the ESN cell, where approx. density percent of elements being non-zero (default:
0.01)- reservoir_representation: enum[sparse,dense]
Representation of the ESN reservoirs. sparse is significantly faster than dense (default:
sparse)- imed_loss: boolean
Calculate loss on spatially aware (image-based) data representation instead of flat arrays (default:
False)- train_method: enum[pinv_lstsq,pinv_svd,tikhonov]
Solver used to train the ESN. tikhonov - linear solver with tikhonov regularization, pinv_lstsq - exact least-squares-solver that may lead to a numerical blowup, pinv_svd - SVD-based least-squares-solver that is highly numerically stable, but approximate (default:
pinv_svd)- tikhonov_beta: float
Parameter of the Tikhonov regularization term when train_method = tikhonov is used. (default:
None)- verbose: int
Controls the logging output (default:
2)- scoring_small_window_size: int
Size of the smaller of two windows slid over the prediction errors to calculate the final anomaly scores. (default:
10)- scoring_large_window_size: int
Size of the larger of two windows slid over the prediction errors to calculate the final anomaly scores. (default:
100)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Torsk algorithm.- Return type
timeeval.algorithms.triple_es¶
- timeeval.algorithms.triple_es(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
Triple ES (Holt-Winter’s)
Implementation of http://www.diva-portal.org/smash/get/diva2:1198551/FULLTEXT02.pdf
Algorithm Parameters:
- train_window_size: int
size of each TripleES model to predict the next timestep (default:
200)- period: int
number of time units at which events happen regularly/periodically (default:
100)- trend: enum[add, mul]
type of trend component (default:
add)- seasonal: enum[add, mul]
type of seasonal component (default:
add)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the Triple ES (Holt-Winter’s) algorithm.- Return type
timeeval.algorithms.ts_bitmap¶
- timeeval.algorithms.ts_bitmap(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
TSBitmap
Implementation of https://dl.acm.org/doi/abs/10.5555/1116877.1116907
Algorithm Parameters:
- feature_window_size: int
Size of the tumbling windows used for SAX discretization. (default:
100)- lead_window_size: int
How far to look ahead to create lead bitmap. (default:
200)- lag_window_size: int
How far to look back to create the lag bitmap. (default:
300)- alphabet_size: int
Number of bins for SAX discretization. (default:
5)- level_size: int
Desired level of recursion of the bitmap. (default:
3)- compression_ratio: int
How much to compress the timeseries in the PAA step. If compression_ration == 1, no compression. (default:
2)- random_state: int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the TSBitmap algorithm.- Return type
timeeval.algorithms.valmod¶
- timeeval.algorithms.valmod(params: Optional[ParameterConfig] = None, skip_pull: bool = False, timeout: Optional[Duration] = None) Algorithm¶
VALMOD
Implementation of https://doi.org/10.1007/s10618-020-00685-w.
Algorithm Parameters:
- min_anomaly_window_size: Int
Minimum sliding window size (default:
30)- max_anomaly_window_size: Int
Maximum sliding window size (default:
40)- heap_size: Int
Size of the distance profile heap buffer (default:
50)- exclusion_zone: Float
Size of the exclusion zone as a factor of the window_size. This prevents self-matches. (default:
0.5)- verbose: Int
Controls logging verbosity. (default:
1)- random_state: Int
Seed for random number generation. (default:
42)
- Parameters
params (
Optional[ParameterConfig]) – Parameter configuration for the algorithmskip_pull (
bool) – Set toTrueto skip pulling the Docker image and use a local image instead. If the image is not present locally, this will raise an error.timeout (
Optional[Duration]) – Set an individual execution and training timeout for this algorithm. This will overwrite the global timeouts set usingResourceConstraints.
- Returns
A correctly configured
Algorithmobject for the VALMOD algorithm.- Return type