Pipeline module
- This module contains functionality to combine preprocessing and anomaly detection
in a single wrapped object.
>>> from dtaianomaly import pipeline
Users are not expected to extend the base Pipeline objects as they are
wrappers of underlying dtaianomaly objects. Custom functionality is
better achieved by implementing the dtaianomaly.preprocessing.Preprocessor,
dtaianomaly.anomaly_detection.BaseDetector or
dtaianomaly.evaluation.Metric objects.
- class dtaianomaly.pipeline.Pipeline(preprocessor: Preprocessor | list[Preprocessor], detector: BaseDetector)[source]
Pipeline to combine preprocessing and anomaly detection
The pipeline works with a single
Preprocessorobject or a list ofPreprocessorobjects. This list is converted into aChainedPreprocessor. At the moment the Pipeline always requires a Preprocessor object passed at construction. If no preprocessing is desired, you need to explicitly pass anIdentitypreprocessor.- Parameters:
preprocessor (Preprocessor or list of Preprocessors) – The preprocessors to include in this pipeline.
detector (BaseDetector) – The anomaly detector to include in this pipeline.