diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 159c165a..fd98e4e0 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-13T01:18:55","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-14T01:17:17","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 1a5f558a..d0cadbc2 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -7,4 +7,4 @@ x = rand(proposal, 1_000, 100) log_ratios = logpdf.(target, x) .- logpdf.(proposal, x) result = psis(log_ratios) -paretoshapeplot(result)

We can also plot the Pareto shape parameters directly:

paretoshapeplot(result.pareto_shape)

We can also use plot directly:

plot(result.pareto_shape; showlines=true)
source
+paretoshapeplot(result)

We can also plot the Pareto shape parameters directly:

paretoshapeplot(result.pareto_shape)

We can also use plot directly:

plot(result.pareto_shape; showlines=true)
source
diff --git a/dev/index.html b/dev/index.html index fe5108a3..2ecd9b5b 100644 --- a/dev/index.html +++ b/dev/index.html @@ -14,4 +14,4 @@ (-Inf, 0.5] good 7 (23.3%) 959 (0.5, 0.7] okay 14 (46.7%) 927 (0.7, 1] bad 8 (26.7%) —— - (1, Inf) very bad 1 (3.3%) ——

As indicated by the warnings, this is a poor choice of a proposal distribution, and estimates are unlikely to converge (see PSISResult for an explanation of the shape thresholds).

When running PSIS with many parameters, it is useful to plot the Pareto shape values to diagnose convergence. See Plotting PSIS results for examples.

+ (1, Inf) very bad 1 (3.3%) ——

As indicated by the warnings, this is a poor choice of a proposal distribution, and estimates are unlikely to converge (see PSISResult for an explanation of the shape thresholds).

When running PSIS with many parameters, it is useful to plot the Pareto shape values to diagnose convergence. See Plotting PSIS results for examples.

diff --git a/dev/internal/index.html b/dev/internal/index.html index b52a12da..3b92f16b 100644 --- a/dev/internal/index.html +++ b/dev/internal/index.html @@ -1,2 +1,2 @@ -Internal · PSIS.jl

Internal

PSIS.GeneralizedParetoType
GeneralizedPareto{T<:Real}

The generalized Pareto distribution.

This is equivalent to Distributions.GeneralizedPareto and can be converted to one with convert(Distributions.GeneralizedPareto, d).

Constructor

GeneralizedPareto(μ, σ, k)

Construct the generalized Pareto distribution (GPD) with location parameter $μ$, scale parameter $σ$ and shape parameter $k$.

Note

The shape parameter $k$ is equivalent to the commonly used shape parameter $ξ$. This is the same parameterization used by [VehtariSimpson2021] and is related to that used by [ZhangStephens2009] as $k \mapsto -k$.

source
PSIS.fit_gpdMethod
fit_gpd(x; μ=0, kwargs...)

Fit a GeneralizedPareto with location μ to the data x.

The fit is performed using the Empirical Bayes method of [ZhangStephens2009].

Keywords

  • prior_adjusted::Bool=true, If true, a weakly informative Normal prior centered on $\frac{1}{2}$ is used for the shape $k$.
  • sorted::Bool=issorted(x): If true, x is assumed to be sorted. If false, a sorted copy of x is made.
  • min_points::Int=30: The minimum number of quadrature points to use when estimating the posterior mean of $\theta = \frac{\xi}{\sigma}$.
source
+Internal · PSIS.jl

Internal

PSIS.GeneralizedParetoType
GeneralizedPareto{T<:Real}

The generalized Pareto distribution.

This is equivalent to Distributions.GeneralizedPareto and can be converted to one with convert(Distributions.GeneralizedPareto, d).

Constructor

GeneralizedPareto(μ, σ, k)

Construct the generalized Pareto distribution (GPD) with location parameter $μ$, scale parameter $σ$ and shape parameter $k$.

Note

The shape parameter $k$ is equivalent to the commonly used shape parameter $ξ$. This is the same parameterization used by [VehtariSimpson2021] and is related to that used by [ZhangStephens2009] as $k \mapsto -k$.

source
PSIS.fit_gpdMethod
fit_gpd(x; μ=0, kwargs...)

Fit a GeneralizedPareto with location μ to the data x.

The fit is performed using the Empirical Bayes method of [ZhangStephens2009].

Keywords

  • prior_adjusted::Bool=true, If true, a weakly informative Normal prior centered on $\frac{1}{2}$ is used for the shape $k$.
  • sorted::Bool=issorted(x): If true, x is assumed to be sorted. If false, a sorted copy of x is made.
  • min_points::Int=30: The minimum number of quadrature points to use when estimating the posterior mean of $\theta = \frac{\xi}{\sigma}$.
source
diff --git a/dev/plotting/c1ea38d4.svg b/dev/plotting/8e580b23.svg similarity index 76% rename from dev/plotting/c1ea38d4.svg rename to dev/plotting/8e580b23.svg index 48976b0d..7ae0fd30 100644 --- a/dev/plotting/c1ea38d4.svg +++ b/dev/plotting/8e580b23.svg @@ -1,124 +1,124 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/plotting/index.html b/dev/plotting/index.html index 4076d511..556e5827 100644 --- a/dev/plotting/index.html +++ b/dev/plotting/index.html @@ -11,4 +11,4 @@ (-Inf, 0.5] good 4 (20.0%) 959 (0.5, 0.7] okay 10 (50.0%) 927 (0.7, 1] bad 6 (30.0%) ——

Plots.jl

PSISResult objects can be plotted directly:

using Plots
-plot(result; showlines=true, marker=:+, legend=false, linewidth=2)
Example block output

This is equivalent to calling PSISPlots.paretoshapeplot(result; kwargs...).

+plot(result; showlines=true, marker=:+, legend=false, linewidth=2)Example block output

This is equivalent to calling PSISPlots.paretoshapeplot(result; kwargs...).