Job

class dtaianomaly.workflow.Job(dataloader: LazyDataLoader, detector: BaseDetector, preprocessor: Preprocessor = None)[source]

A job to execute within the JobBasedWorkflow.

A single job to be executed within a workflow. A job contains (1) a data loader to indicate which data to use, (2) an optional preprocessor to process the data in some way, and (3) a detector to find the anomalies.

Parameters:
dataloaderLazyDataLoader

The data loader that should be used for loading the time series data.

detectorBaseDetector

The anomaly detector to use for detecting anomalies, after the time series has been preprocessed.

preprocessorPreprocessor or None

The preprocessor to use for processing the time series, before the anomalies are detected. If no preprocessor is given (preprocessor=None), then the time series does not need to be processed.

Attributes:
pipelinePipeline

The pipeline which combines the preprocessor and the anomaly detector, such that the anomalies can be detected with a single call. If no preprocessor was given, the preprocessor of the pipeline equals Identity().

has_preprocessorbool

Whether this job has a preprocessor, i.e., whether preprocessor == None.