pyesmda.get_anomaly_matrix#
- pyesmda.get_anomaly_matrix(ensemble: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]#
Return the zero-mean (i.e., centered) anomaly matrix of the ensemble.
- Parameters:
ensemble (NDArrayFloat) – Ensemble of realization with shape ($N_{m}$, $N_{e}$), $N_{e}$ and $N_{m}$ being the ensemble size and one member size respectively.
Examples
>>> X = np.array([[-2.4, -0.3, 0.7, 0.2, 1.1], ... [-1.5, 0.4, -0.4, -0.9, 1. ], ... [-0.1, -0.4, -0. , -0.5, 1.1]]) >>> get_anomaly_matrix(X) array([[-0.75424723, -0.11785113, 0.87209836], [-0.14142136, 0.35355339, -0.21213203], [ 0.42426407, -0.35355339, -0.07071068], [ 0.42426407, -0.35355339, -0.07071068], [ 0.02357023, -0.04714045, 0.02357023]])
- Return type:
The anomaly matrix with with shape ($N_{e}$, $N_{m}$).