dea_tools.validation

Tools for validating outputs and producing accuracy assessment metrics.

License: The code in this notebook is licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0). Digital Earth Australia data is licensed under the Creative Commons by Attribution 4.0 license (https://creativecommons.org/licenses/by/4.0/).

Contact: If you need assistance, please post a question on the Open Data Cube Slack channel (http://slack.opendatacube.org/) or on the GIS Stack Exchange (https://gis.stackexchange.com/questions/ask?tags=open-data-cube) using the open-data-cube tag (you can view previously asked questions here: https://gis.stackexchange.com/questions/tagged/open-data-cube).

If you would like to report an issue with this script, you can file one on GitHub (GeoscienceAustralia/dea-notebooks#new).

Last modified: April 2023

Functions

eval_metrics(x, y[, round, all_regress])

Calculate a set of common statistical metrics based on two input actual and predicted vectors.

dea_tools.validation.eval_metrics(x, y, round=3, all_regress=False)[source]

Calculate a set of common statistical metrics based on two input actual and predicted vectors.

These include:
  • Pearson correlation

  • Root Mean Squared Error

  • Mean Absolute Error

  • R-squared

  • Bias

  • Linear regression parameters (slope, p-value, intercept, standard error)

Parameters:
  • x (numpy.array) – An array providing “actual” variable values

  • y (numpy.array) – An array providing “predicted” variable values

  • round (int) – Number of decimal places to round each metric to. Defaults to 3

  • all_regress (bool) – Whether to return linear regression p-value, intercept and standard error (in addition to only regression slope). Defaults to False

Return type:

A pandas.Series containing calculated metrics