Skip to content

Make MCMCDiagnosticTools an optional dependency #42

@sethaxen

Description

@sethaxen

PSIS is generally useful for diagnosing importance sampling, but importance weights are not always generated with MCMC. Since MCMCDiagnosticTools is a somewhat heavy dependency, it's a shame it makes this package less lightweight for non-MCMC applications.

We could instead make MCMCDT a conditional dependency using Requires. I propose something like the following methods:

psis(log_ratios; kwargs...): computes PSIS assuming r_eff=1
psis(log_ratios, r_eff; kwargs...): computes PSIS using the user-provided r_eff.
psis(log_ratios; ess_method::MCMCDiagnosticTools.AbstractESSMethod, kwargs...): defined if MCMCDiagnosticTools.jl is loaded using Requires; computes r_eff using the provided ESS method and calls psis(log_ratios, r_eff; kwargs...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions