mesmer.calibrate_mesmer.train_l_prepare_X_y_wgteq

mesmer.calibrate_mesmer.train_l_prepare_X_y_wgteq(preds, targs)

Create single array of predictors, single array of targets, and single array of weights.

Parameters
  • preds (dict) – empty dictionary if none, else nested dictionary of predictors with keys

    • [pred][scen] (1d/ 2d arrays (time)/(run, time) of predictor for specific scenario)

  • targs (dict) – nested dictionary of targets with keys

    • [targ][scen] (3d array (run, time, gp) of target for specific scenario)

Returns

  • X (np.ndarray) – empty array if none, else 2d array (sample, pred) of predictors

  • y (np.ndarray) – 3d array (sample, gp, targ) of targets

  • wgt_scen_eq (np.ndarray) – 1d array (sample) of sample weights based on equal treatment of each scenario (if scen has more samples, each sample gets less weight)