-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
On Slack we were discussing replacing ParetoSmooth with PSIS+PosteriorStats. This issue compares the functions of the two sets of packages, which will hopefully make it easier to make the switch.
Function mappings
ParetoSmooth.psis->PSIS.psisParetoSmooth.psis_loo/ParetoSmooth.loo->PosteriorStats.looParetoSmooth.loo_compare->PosteriorStats.compare
Note that the signatures and dimension orders of the arguments may differ from ParetoSmooth. However, PSIS+PosteriorStats use the same conventions as MCMCDiagnosticTools, so arguably their signatures are more consistent.
Struct mappings
ParetoSmooth.ModelComparison->PosteriorStats.ModelComparisonResultParetoSmooth.Psis->PSIS.PSISResultParetoSmooth.PsisLoo->PosteriorStats.PSISLOOResult
These are just included for completeness. Note that the fields of the structs, methods defined on them, and how they are shown in the terminal are not the same.
Functions that should be moved here
ParetoSmooth.pointwise_loglikelihoods: The main use of this utility is to get log-likelihoods from a Turing model in the format required byParetoSmooth.loo, so perhaps it should be moved here (or to DynamicPPL).
Note again that dimension ordering of the output would I think need to change.
Functions that should go away
ParetoSmooth.loo_from_psis: this could be replaced with a simple overloadPosteriorStats.loo(::PSIS.PSISResult)in PosteriorStats. A coming refactor to PosteriorStats might introduce this.ParetoSmooth.naive_lpd: PosteriorStats has the internal methodPosteriorStats._lpd_pointwisefor computing this, but even ParetoSmooth advises against its use.ParetoSmooth.psis_ess: I'm not certain where this ESS estimate comes from, as I can't find it described in the reference it cites. However, the loo package and recent versions of the PSIS paper give an ESS for the normalization term, which is implemented asPSIS.ess_isParetoSmooth.ess_sup: While the one inPSIS.ess_isis a variance-based (i.e. l2-norm) ESS estimate, this implements one based on thelinf-norm. This isn't mentioned in any of the LOO or PSIS papers, and sinceMCMCDiagnosticTools.essis also variance-based, I think it is unnecessary to include this estimator. Note that varianced-based ESS estimates are closely tied to the concepts of estimator variance and MCSE, so they have a more straightforward interpretation.ParetoSmooth.relative_eff: inPosteriorStats.loo, leavingreff=Noneresults in the relative ESS being computed internally, so no need to expose this function.
sunxd3 and ParadaCarletonCopilot
Metadata
Metadata
Assignees
Labels
No labels