diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 6d747cee..cc07d2db 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-02T01:22:52","documenter_version":"1.0.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-03T01:23:48","documenter_version":"1.0.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 6368403b..5ec59641 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -41,4 +41,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 d5ee5ed9..2e62fa16 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 13 (43.3%) 938 (0.7, 1] bad 9 (30.0%) —— - (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 4b31b1db..ef2e5562 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.

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 Vehtari *et al.* [1] and is related to that used by Zhang and Stephens [2] 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 Zhang and Stephens [2].

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}$.

References

  • [2] Zhang & Stephens, Technometrics 51:3 (2009)
source
+Internal · PSIS.jl

Internal

PSIS.GeneralizedParetoType
GeneralizedPareto{T<:Real}

The generalized Pareto distribution.

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 Vehtari *et al.* [1] and is related to that used by Zhang and Stephens [2] 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 Zhang and Stephens [2].

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}$.

References

  • [2] Zhang & Stephens, Technometrics 51:3 (2009)
source
diff --git a/dev/plotting/6ed4182c.svg b/dev/plotting/87b2eadf.svg similarity index 75% rename from dev/plotting/6ed4182c.svg rename to dev/plotting/87b2eadf.svg index c9829033..dc405290 100644 --- a/dev/plotting/6ed4182c.svg +++ b/dev/plotting/87b2eadf.svg @@ -1,176 +1,176 @@ - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/plotting/index.html b/dev/plotting/index.html index 045c867b..0419cae1 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 9 (45.0%) 938 (0.7, 1] bad 7 (35.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...).

diff --git a/dev/references/index.html b/dev/references/index.html index 167510b5..fbfca063 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -6,4 +6,4 @@
J. Zhang and M. A. Stephens. A New and Efficient Estimation Method for the Generalized Pareto Distribution. Technometrics : a journal of statistics for the physical, chemical, and engineering sciences 51, 316–325 (2009).
- +