metrics_accuracy module

This section contains the Python API reference for the uncertainty_toolbox.metrics_accuracy module, which contains code for metrics involving accuracy.

uncertainty_toolbox.metrics_accuracy Module

Metrics for assessing the quality of predictive uncertainty quantification.

uncertainty_toolbox.metrics_accuracy.prediction_error_metrics(y_pred, y_true)

Get all prediction error metrics.

Parameters
  • y_pred (ndarray) – 1D array of the predicted means for the held out dataset.

  • y_true (ndarray) – 1D array of the true labels in the held out dataset.

Return type

Dict[str, float]

Returns

A dictionary with Mean average error (‘mae’), Root mean squared error (‘rmse’), Median absolute error (‘mdae’), Mean absolute relative percent difference (‘marpd’), r^2 (‘r2’), and Pearson’s correlation coefficient (‘corr’).