MODULE REFERENCE
pipeline
anomx.detection.pipelineComposable anomaly pipeline over the canonical observation representation.
` pipeline = AnomalyPipeline( model=ConstantBaselineModel(), scorer=AbsoluteErrorScorer(), detector=ThresholdDetector(), ) pipeline.fit(observation_set) events = pipeline.detect(observation_set) `
The pipeline generalizes the anomaly-detection process, not the individual algorithms: each component declares capabilities that are validated against the observation set characteristics before anything is executed.
AnomalyPipeline
AnomalyPipeline(*, model: NormalityModel, scorer: Scorer, detector: Detector, calibrator: Any | None = None, score_level: ScoreLevel = ScoreLevel.SAMPLE)Compose model, scorer, optional calibrator, and detector into one method.
| Parameter | Type | Default |
|---|---|---|
modelkeyword only | NormalityModel | required |
scorerkeyword only | Scorer | required |
detectorkeyword only | Detector | required |
calibratorkeyword only | Any | None | None |
score_levelkeyword only | ScoreLevel | ScoreLevel.SAMPLE |
Members
validatemethod
validate(observation_set: ObservationSet) -> list[str]Validate dataset characteristics against every component capability.
| Parameter | Type | Default |
|---|---|---|
observation_set | ObservationSet | required |
Returns list[str]
fitmethod
fit(observation_set: ObservationSet) -> None| Parameter | Type | Default |
|---|---|---|
observation_set | ObservationSet | required |
Returns None
detectmethod
detect(observation_set: ObservationSet) -> AnomalyEvents| Parameter | Type | Default |
|---|---|---|
observation_set | ObservationSet | required |
Returns AnomalyEvents
PipelineValidationError
PipelineValidationError(problems: list[str])Bases: ValueError
Raised when component capabilities do not match the observation set.
| Parameter | Type | Default |
|---|---|---|
problems | list[str] | required |