energy_fault_detector.anomaly_scores.rmse_score
- class RMSEScore(scale=True, **kwargs)
Bases:
AnomalyScoreCalculate the RMSE of given reconstruction errors.
- scale
If True, mean and std of the training/fit reconstruction errors will be used to standardize recon errors during transform. Default: True
Configuration example:
train: anomaly_score: name: rmse params: scale: false- fit(x, y=None)
Calculate standard deviation and mean on training data
- Parameters:
x (
Union[DataFrame,ndarray]) – numpy 2d array with differences between prediction and actual sensor valuesy (optional) – not used, labels indicating whether sample is normal (True) or anomalous (False).
- Return type:
- transform(x)
Calculate the RMSE based on the deviation matrix.
- Parameters:
x (
Union[DataFrame,ndarray]) – numpy 2d array or pandas Dataframe with differences between prediction and actual sensor values- Return type:
Series- Returns:
RMSE for each sample.