Skip to content

Refactor to support new diagnostics#62

Draft
sethaxen wants to merge 39 commits intomainfrom
refactor
Draft

Refactor to support new diagnostics#62
sethaxen wants to merge 39 commits intomainfrom
refactor

Conversation

@sethaxen
Copy link
Copy Markdown
Member

The latest version of the PSIS paper added new diagnostics in addition to the Pareto shape diagnostic. The new diagnostics are detailed in stan-dev/posterior#237.

This PR adds these diagnostics. It additionally will completely refactor the codebase to separate diagnosing from smoothing. In particular, it adds pareto_diagnose and pareto_smooth. The former simply computes all diagnostics for the specified tails, while the latter both computes diagnostics for the tails but also smooths them.

Fixes #26. Relates #21.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 26, 2023

Codecov Report

Attention: 68 lines in your changes are missing coverage. Please review.

Comparison is base (3e6e5ec) 97.44% compared to head (3ff48a4) 78.07%.

❗ Current head 3ff48a4 differs from pull request most recent head 77a5983. Consider uploading reports for the commit 77a5983 to get more accurate results

Files Patch % Lines
src/pareto_diagnose.jl 0.00% 57 Missing ⚠️
src/diagnostics.jl 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #62       +/-   ##
===========================================
- Coverage   97.44%   78.07%   -19.38%     
===========================================
  Files           6        8        +2     
  Lines         274      342       +68     
===========================================
  Hits          267      267               
- Misses          7       75       +68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread src/core.jl Outdated
Comment thread src/recipes/plots.jl Outdated
@arviz-devs arviz-devs deleted a comment from coderabbitai Bot Aug 19, 2024
Comment thread src/diagnostics.jl
Comment on lines +18 to +20
- if ``0.5 < \\hat{k} \\lessim 0.7, then the variance is infinite and plain IS can behave
poorly. PSIS works well in this regime, but the convergence rate is between ``S^{−1/2}``
and ``S^{−3/10}``.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
- if ``0.5 < \\hat{k} \\lessim 0.7, then the variance is infinite and plain IS can behave
poorly. PSIS works well in this regime, but the convergence rate is between ``S^{1/2}``
and ``S^{3/10}``.
- if ``0.5 < \\hat{k} \\lessim 0.7, then the variance is infinite and plain IS can behave poorly. PSIS works well in this regime, but the convergence rate is between``S^{1/2}``and``S^{3/10}``.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow diagnosing without smoothing

1 participant