energy_fault_detector.core.anomaly_score

class AnomalyScore(*args, **kwargs)

Bases: BaseEstimator, TransformerMixin, SaveLoadMixin, ABC

Anomaly score template

abstractmethod fit(x, y=None)

Fit the scorer.

Parameters:
  • x (Union[DataFrame, ndarray]) – numpy 2d array with differences between prediction and actual sensor values

  • y (Optional[Series]) – labels indicating whether sample is normal (True) or anomalous (False).

Return type:

AnomalyScore

abstractmethod transform(x)

Implement transform method.

Parameters:

x (Union[DataFrame, ndarray]) – input data

Return type:

Series

Returns:

Scores