mesmer.distrib.ConditionalDistribution.compute_quality_scores

mesmer.distrib.ConditionalDistribution.compute_quality_scores#

ConditionalDistribution.compute_quality_scores(predictors, target, weights, *, sample_dim='sample', scores=['func_optim', 'nll', 'bic'])#

Compute scores for fit coefficients.

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

  • target (xr.DataArray) – Target DataArray.

  • sample_dim (str) – Dimension along which to calculate the scores.

  • weights (xr.DataArray.) – Individual weights for each sample.

  • scores (list of str, default: [‘func_optim’, ‘nll’, ‘bic’]) – After the fit, several scores can be calculated to assess the performance:

    • “func_optim”: function optimized, as described in options_optim[‘type_fun_optim’]: negative log likelihood or full conditional negative log likelihood

    • “nll”: Negative Log Likelihood

    • “bic”: Bayesian Information Criteria

    • “crps”: Continuous Ranked Probability Score (warning: takes a long time to compute)

Returns:

scores (xr.Dataset) – Dataset containing the scores for each gridpoint.

Notes

“nll” may or may not be the same as “func_optim”