eradiate.test_tools.regression.RMSETest#
- class eradiate.test_tools.regression.RMSETest(name, value, reference=None, *, threshold, archive_dir)[source]#
Bases:
RegressionTestThis class implements a simple test based on the root mean squared error (RMSE) of a result array with respect to the reference data.
The test will pass if the computed root mean squared deviation between the result and reference is smaller or equal to the given threshold.
- Parameters:
name (
str) – Test case name.value (
xarray.Dataset) – Simulation result. Must be specified as a dataset.reference (
xarray.Datasetor path-like, optional, default:None) – Reference data. Can be specified as an xarray dataset, a path to a NetCDF file or a path to a resource served by the data store.threshold (
float) – Threshold for test evaluationarchive_dir (path-like) – Path to output artefact storage directory. Relative paths are interpreted with respect to the current working directory.
- Fields:
name (
str) – Test case name.value (
xarray.Dataset) – Simulation result.reference (
xarray.DatasetorNone) – Reference data.threshold (
float) – Threshold for test evaluation.archive_dir (
pathlib.Path) – Path to output artefact storage directory.