Skip to content

Additional LOO utilities #8

@sethaxen

Description

@sethaxen

From arviz-devs/arviz#2059, we should add the following utilities:

  • loo_expectation(log_likelihood, expectand; kwargs...): Approximate each expectand with respect to each LOO posterior using PSIS-LOO. e.g. loo_pit could be reimplemented by setting expectand = y_pred .≤ reshape(y, 1, 1, size(y)...). It's important to support the option of computing expectation-specific PSIS diagnostics, which requires Add convenience function for computing expectation-specific diagnostics PSIS.jl#21.
  • loo_predictive_error(log_likelihood, metric; kwargs...): uses loo_expectation to compute LOO posterior predictive means and then use metric to evaluate the quality of the fit.
  • loo_crps(psis_loo_result; scale=false, kwargs...): compute continuous ranked probability score (CRPS) or it's scaled variant SCRPS, which is another strictly proper scoring rule besides Log score (ELPD) to use for model comparison. Requires 2 posterior draws for each draw-chain. But before adding this, we should think about the model comparison API some more. In principle the user could select different scores or accuracy metrics for model comparison. And section 2.1 of https://arxiv.org/abs/1704.02030 generalizes stacking weights for any proper scoring rule, so our stacking implementation could be updated to do so as well.

The APIs written here are putative. Odds are they will be refined during implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions