hookeai.utilities.output_prediction_metrics.compute_directory_prediction_metrics¶
- compute_directory_prediction_metrics(predictions_dir, mean_prediction_metrics, process_label='', is_save_file=False, is_display_results=False)[source]¶
Compute mean prediction metrics for given prediction directory.
- Parameters:
predictions_dir (str) – Directory where samples predictions results files are stored.
mean_prediction_metrics (list[str]) – Mean prediction metrics.
process_label (str, default='') – Prediction process label.
is_save_file (bool, default=False) – If True, then save file with mean prediction metrics in predictions dedicated subdirectory.
is_display_results (bool, default=False) – If True, then display mean prediction metrics to standard output device.
- Returns:
n_sample (int) – Number of samples.
mean_metrics_results (dict) – Samples mean value (item, torch.Tensor) of each prediction metric (key, str).