energy_fault_detector.quick_fault_detection.output
- generate_output_plots(anomaly_detector, train_data, normal_index, test_data, event_meta_data, arcana_mean_importances, arcana_losses, save_dir=None)
Generates output plots based on failure detection results. The default output presented in a subplot with 2 rows and 2 columns containing: 1. Prediction anomaly score plot with marked anomaly events + threshold 2. Training anomaly score plot + threshold 3. Learning curve plot of the autoencoder 4. Optionally ARCANA-importances if anomaly events have been detected. Optional debug plots are provided if arcana_losses are provided.
- Parameters:
anomaly_detector (FaultDetector) – Trained AnomalyDetector instance
train_data (pd.DataFrame) – dataframe containing the numerical data used for the AnomalyDetector training.
normal_index (Union[pd.Series, None])
test_data (pd.DataFrame) – dataframe containing the data used for evaluation.
event_meta_data (pd.Dataframe) – Potentially empty dataframe containing information about event starts, ends and durations if there are anomaly events.
arcana_mean_importances (List[pd.Series]) – If anomalies are present this list contains a pandas series for each event which contains the mean Arcana-importance values for every feature in the data.
arcana_losses (List[pd.DataFrame]) – Potentially empty List of dataframe containing recorded ARCANA losses for each event if the losses were tracked.
save_dir (Optional[str]) – Directory to save the output plots. If not provided, the plots are not saved. Defaults to None.
- Return type: