Bases: ABC
Abstract base class for anomaly detector.
Attributes:
- schema: The schema representing the instances. Defaults to None.
- random_seed: The random seed for reproducibility. Defaults to 1.
-
__init__(schema: Schema, random_seed=1)[source]
-
abstract train(instance: Instance)[source]
-
abstract predict(instance: Instance) → int | None[source]
-
abstract score_instance(instance: Instance) → float[source]
Returns the anomaly score for the instance.
A high score is indicative of an anomaly.
- Parameters:
instance – The instance for which the anomaly score is calculated.
- Returns:
The anomaly score for the instance.