mesmer.calibrate_mesmer.train_lv_find_localized_ecov

mesmer.calibrate_mesmer.train_lv_find_localized_ecov(y, wgt_scen_eq, aux, cfg)

Find suitable localization radius for empirical covariance matrix and derive localized empirical cov matrix.

Parameters
  • y (np.ndarray) – 2d array (sample, gp) of specific target

  • wgt_scen_eq (np.ndarray) – 1d array (sample) of sample weights

  • aux (dict) – provides auxiliary variables needed for lv method at hand

    • [“phi_gc”] (dict with localisation radii as keys and each containing a 2d array (gp, gp) of of Gaspari-Cohn correlation matrix

  • cfg (module) – config file containing metadata

Returns

  • L_sel (numpy.int64) – selected localization radius

  • ecov (np.ndarray) – 2d empirical covariance matrix array (gp, gp)

  • loc_ecov (np.ndarray) – 2d localized empirical covariance matrix array (gp, gp)

Notes

  • Function could also handle determining ecov of several variables but would all have to be passed in same 2d y array (with corresponding wgt_scen_eq, aux[“phi_gc”] shapes)