unox.evaluate ============= .. py:module:: unox.evaluate Functions --------- .. autoapisummary:: unox.evaluate.compare_arrs Module Contents --------------- .. py:function:: compare_arrs(a_xr_arr, b_xr_arr, val_type, **kwargs) Get a measure of similarity between two arrays. If selecting the `'R2'` type: Calculates a correlation between the values of the two given arrays and returns the R^2 value. If selecting the `'RMSE'` type: Calculates the root mean square error between the two given arrays and returns the RMSE value. :param a_xr_arr: The first xarray DataArray or numpy array to compare. :type a_xr_arr: `xarray.DataArray`, `numpy.ndarray` :param b_xr_arr: The second xarray DataArray or numpy array to compare. :type b_xr_arr: `xarray.DataArray`, `numpy.ndarray` :param val_type: The type of comparison to perform. Options are `'R2'` for R-squared correlation (default) or `'RMSE'` for root mean squared error. :type val_type: `str` :param \*\*kwargs: Additional keyword arguments accepted to facilitate wrapper functions. :type \*\*kwargs: keyword arguments :returns: **comp_value** -- The numeric value comparing the two arrays. Will either be R^2 or RMSE depending on the selected type. :rtype: `float`