eradiate.testing.regression.RegressionTestOutcome#

class eradiate.testing.regression.RegressionTestOutcome(passed, metric_name, metric_value, threshold, variable, details=NOTHING, warnings=NOTHING, diagnostic_data=NOTHING)#

Bases: object

Verdict of a single RegressionTest.evaluate() call, together with everything a caller needs to report it.

Parameters:
  • passed (bool) – True iff the test passed.

  • metric_name (str) – Name of the test metric.

  • metric_value (float or None) – Value of the test metric, None if it could not be computed.

  • threshold (float) – Threshold the metric was compared with.

  • variable (str) – Name of the tested data variable.

  • details (dict, default: {}) – Intermediate quantities that document the decision, rendered as report lines by the caller.

  • warnings (list of str, default: []) – Messages the caller should surface as warnings, e.g. about degraded reference data.

  • diagnostic_data (dict, default: {}) – Data consumed by RegressionTest.plot_diagnostic() to draw the diagnostic panel of the comparison chart. Empty when the test has no diagnostic.

Fields:
  • passed (bool) – True iff the test passed.

  • metric_name (str) – Name of the test metric.

  • metric_value (float or None) – Value of the test metric, None if it could not be computed.

  • threshold (float) – Threshold the metric was compared with.

  • variable (str) – Name of the tested data variable.

  • details (dict) – Intermediate quantities that document the decision, rendered as report lines by the caller.

  • warnings (list of str) – Messages the caller should surface as warnings, e.g. about degraded reference data.

  • diagnostic_data (dict) – Data consumed by RegressionTest.plot_diagnostic() to draw the diagnostic panel of the comparison chart.