mesmer.distrib.ConditionalDistribution.find_first_guess

mesmer.distrib.ConditionalDistribution.find_first_guess#

ConditionalDistribution.find_first_guess(predictors, target, weights, first_guess=None, *, sample_dim='sample')#

Find a first guess for all coefficients of a conditional distribution

Parameters:
  • conditional_distrib (ConditionalDistribution) – Conditional distribution object to find the first guess for.

  • predictors (dict of xr.DataArray | xr.Dataset) – A dict of DataArray objects used as predictors or a Dataset, holding each predictor as a data variable. Each predictor must be 1D and contain sample_dim.

  • target (xr.DataArray) – Target DataArray, contains at least sample_dim.

  • weights (xr.DataArray.) – Individual weights for each sample, must be 1D along sample_dim.

  • first_guess (xr.Dataset, default: None) – If provided, will use these values as first guess for the first guess. If None, will use all zeros. Must contain the first guess for each coefficient in a DataArray with the name of the coefficient.

  • sample_dim (str) – Dimension along which to fit the first guess.

Returns:

xr.Dataset – Dataset of first guess for each coefficient of the conditional distribution as a data variable with the name of the coefficient.