energy_fault_detector.core.fault_detection_result

class FaultDetectionResult(predicted_anomalies, reconstruction, recon_error, anomaly_score, bias_data=None, arcana_losses=None, tracked_bias=None)

Bases: object

Class to encapsulate results from the fault detection process.

anomaly_score: Series

Series with predicted anomaly scores.

arcana_losses: Optional[DataFrame] = None

DataFrame containing recorded values for all losses in ARCANA. None if ARCANA was not run.

bias_data: Optional[DataFrame] = None

DataFrame with ARCANA results (ARCANA bias). None if ARCANA was not run.

predicted_anomalies: Series

Series with a predicted anomalies (bool).

recon_error: DataFrame

DataFrame with reconstruction errors.

reconstruction: DataFrame

DataFrame with reconstruction of the input data.

save(directory, **kwargs)

Saves the results to CSV files in the specified directory.

Parameters:
  • directory (str) – The directory where the CSV files will be saved.

  • kwargs – other keywords args for pd.DataFrame.to_csv

Return type:

None

tracked_bias: Optional[List[DataFrame]] = None

List of DataFrames containing the ARCANA bias every 50th iteration. None if ARCANA was not run.

class ModelMetadata(model_date, model_path, train_recon_error, val_recon_error=None)

Bases: object

Class to encapsulate metadata about the FaultDetector model.

model_date: str
model_path: str
train_recon_error: ndarray
val_recon_error: Optional[ndarray] = None