pysteps.utils.pca.pca_backtransform#
- pysteps.utils.pca.pca_backtransform(forecast_ens_pc: ndarray, pca_params: dict)#
Reconstruct ensemble forecasts from principal component (PC) space back into physical space.
- Parameters:
forecast_ens_pc (np.ndarray) – Array of shape (n_components, n_ens) containing the ensemble forecasts represented in PC space.
pca_params (dict) –
Parameters of the PCA transformation. The dictionary contains the following keys:
- principal_componentsnp.ndarray
Array of shape (n_components, n_features) containing the principal component vectors in feature space.
- meannp.ndarray
Array of shape (n_features,) containing the per-feature empirical mean estimated from the training data.
- Returns:
forecast_ens – Array of shape (n_ens, n_features) containing the ensemble forecasts reconstructed in physical space.
- Return type:
np.ndarray