From 8aa8bb277e6a8e6d4d575148e34eb4aadc43707d Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 10 Feb 2025 00:43:33 +0000 Subject: [PATCH] Aggregate documentation --- .../dev/.documenter-siteinfo.json | 2 +- ArviZExampleData/dev/api/index.html | 2 +- ArviZExampleData/dev/datasets/index.html | 2 +- .../dev/for_developers/index.html | 2 +- ArviZExampleData/dev/index.html | 2 +- .../dev/.documenter-siteinfo.json | 2 +- InferenceObjects/dev/dataset/index.html | 2 +- .../extensions/mcmcdiagnostictools/index.html | 2 +- .../dev/extensions/posteriorstats/index.html | 2 +- InferenceObjects/dev/index.html | 2 +- .../dev/inference_data/index.html | 2 +- PSIS/dev/.documenter-siteinfo.json | 2 +- PSIS/dev/api/index.html | 2 +- PSIS/dev/index.html | 2 +- PSIS/dev/internal/index.html | 2 +- .../plotting/{25bac59b.svg => 2f153655.svg} | 218 +++++++++--------- PSIS/dev/plotting/index.html | 2 +- PSIS/dev/references/index.html | 2 +- 18 files changed, 126 insertions(+), 126 deletions(-) rename PSIS/dev/plotting/{25bac59b.svg => 2f153655.svg} (76%) diff --git a/ArviZExampleData/dev/.documenter-siteinfo.json b/ArviZExampleData/dev/.documenter-siteinfo.json index e99c34497..c2f485aee 100644 --- a/ArviZExampleData/dev/.documenter-siteinfo.json +++ b/ArviZExampleData/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-08T01:27:45","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-09T01:41:21","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/ArviZExampleData/dev/api/index.html b/ArviZExampleData/dev/api/index.html index 68a4d688c..d86ab88be 100644 --- a/ArviZExampleData/dev/api/index.html +++ b/ArviZExampleData/dev/api/index.html @@ -31,4 +31,4 @@ > prior > prior_predictive > observed_data - > constant_datasource \ No newline at end of file + > constant_datasource \ No newline at end of file diff --git a/ArviZExampleData/dev/datasets/index.html b/ArviZExampleData/dev/datasets/index.html index eceef09a5..67aaae30c 100644 --- a/ArviZExampleData/dev/datasets/index.html +++ b/ArviZExampleData/dev/datasets/index.html @@ -98,4 +98,4 @@ This model uses a Von Mises distribution to propose torsion angles for the structure of a glycan molecule (pdb id: 2LIQ), and a Potential to estimate the proposed structure's energy. Said Potential is bound by Boltzman's law. -remote: http://ndownloader.figshare.com/files/22882652 \ No newline at end of file +remote: http://ndownloader.figshare.com/files/22882652 \ No newline at end of file diff --git a/ArviZExampleData/dev/for_developers/index.html b/ArviZExampleData/dev/for_developers/index.html index 9e9fe04c4..60d07496f 100644 --- a/ArviZExampleData/dev/for_developers/index.html +++ b/ArviZExampleData/dev/for_developers/index.html @@ -4,4 +4,4 @@ julia> tarball_url = "https://github.com/arviz-devs/arviz_example_data/archive/refs/tags/v$version.tar.gz"; -julia> add_artifact!("Artifacts.toml", "arviz_example_data", tarball_url; force=true); \ No newline at end of file +julia> add_artifact!("Artifacts.toml", "arviz_example_data", tarball_url; force=true); \ No newline at end of file diff --git a/ArviZExampleData/dev/index.html b/ArviZExampleData/dev/index.html index 36f26a0d0..0710f89fc 100644 --- a/ArviZExampleData/dev/index.html +++ b/ArviZExampleData/dev/index.html @@ -1 +1 @@ -Home · ArviZExampleData.jl
\ No newline at end of file +Home · ArviZExampleData.jl
\ No newline at end of file diff --git a/InferenceObjects/dev/.documenter-siteinfo.json b/InferenceObjects/dev/.documenter-siteinfo.json index ebe8682d4..803acbbd8 100644 --- a/InferenceObjects/dev/.documenter-siteinfo.json +++ b/InferenceObjects/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-08T00:55:11","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-09T00:59:37","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/InferenceObjects/dev/dataset/index.html b/InferenceObjects/dev/dataset/index.html index 4fb70f728..1d4611d01 100644 --- a/InferenceObjects/dev/dataset/index.html +++ b/InferenceObjects/dev/dataset/index.html @@ -5,4 +5,4 @@ data::NamedTuple, dims::Tuple{Vararg{DimensionalData.Dimension}}; metadata=DimensionalData.NoMetadata(), -)

In most cases, use convert_to_dataset to create a Dataset instead of directly using a constructor.

source

General conversion

InferenceObjects.convert_to_datasetFunction
convert_to_dataset(obj; group = :posterior, kwargs...) -> Dataset

Convert a supported object to a Dataset.

In most cases, this function calls convert_to_inference_data and returns the corresponding group.

source
InferenceObjects.namedtuple_to_datasetFunction
namedtuple_to_dataset(data; kwargs...) -> Dataset

Convert NamedTuple mapping variable names to arrays to a Dataset.

Any non-array values will be converted to a 0-dimensional array.

Keywords

  • attrs::AbstractDict{<:AbstractString}: a collection of metadata to attach to the dataset, in addition to defaults. Values should be JSON serializable.
  • library::Union{String,Module}: library used for performing inference. Will be attached to the attrs metadata.
  • dims: a collection mapping variable names to collections of objects containing dimension names. Acceptable such objects are:
    • Symbol: dimension name
    • Type{<:DimensionsionalData.Dimension}: dimension type
    • DimensionsionalData.Dimension: dimension, potentially with indices
    • Nothing: no dimension name provided, dimension name is automatically generated
  • coords: a collection indexable by dimension name specifying the indices of the given dimension. If indices for a dimension in dims are provided, they are used even if the dimension contains its own indices. If a dimension is missing, its indices are automatically generated.
source

DimensionalData

As a DimensionalData.AbstractDimStack, Dataset also implements the AbstractDimStack API and can be used like a DimStack. See DimensionalData's documentation for example usage.

Tables inteface

Dataset implements the Tables interface. This allows Datasets to be used as sources for any function that can accept a table. For example, it's straightforward to:

\ No newline at end of file +)

In most cases, use convert_to_dataset to create a Dataset instead of directly using a constructor.

source

General conversion

InferenceObjects.convert_to_datasetFunction
convert_to_dataset(obj; group = :posterior, kwargs...) -> Dataset

Convert a supported object to a Dataset.

In most cases, this function calls convert_to_inference_data and returns the corresponding group.

source
InferenceObjects.namedtuple_to_datasetFunction
namedtuple_to_dataset(data; kwargs...) -> Dataset

Convert NamedTuple mapping variable names to arrays to a Dataset.

Any non-array values will be converted to a 0-dimensional array.

Keywords

  • attrs::AbstractDict{<:AbstractString}: a collection of metadata to attach to the dataset, in addition to defaults. Values should be JSON serializable.
  • library::Union{String,Module}: library used for performing inference. Will be attached to the attrs metadata.
  • dims: a collection mapping variable names to collections of objects containing dimension names. Acceptable such objects are:
    • Symbol: dimension name
    • Type{<:DimensionsionalData.Dimension}: dimension type
    • DimensionsionalData.Dimension: dimension, potentially with indices
    • Nothing: no dimension name provided, dimension name is automatically generated
  • coords: a collection indexable by dimension name specifying the indices of the given dimension. If indices for a dimension in dims are provided, they are used even if the dimension contains its own indices. If a dimension is missing, its indices are automatically generated.
source

DimensionalData

As a DimensionalData.AbstractDimStack, Dataset also implements the AbstractDimStack API and can be used like a DimStack. See DimensionalData's documentation for example usage.

Tables inteface

Dataset implements the Tables interface. This allows Datasets to be used as sources for any function that can accept a table. For example, it's straightforward to:

\ No newline at end of file diff --git a/InferenceObjects/dev/extensions/mcmcdiagnostictools/index.html b/InferenceObjects/dev/extensions/mcmcdiagnostictools/index.html index f61f9c2e6..410154f0c 100644 --- a/InferenceObjects/dev/extensions/mcmcdiagnostictools/index.html +++ b/InferenceObjects/dev/extensions/mcmcdiagnostictools/index.html @@ -6,4 +6,4 @@ classifier, data::Union{InferenceData,Dataset}; kwargs..., -)

Calculate the $R^*$ diagnostic for the data.

For a description of the classifier and kwargs, see MCMCDiagnosticTools.rstar.

source \ No newline at end of file +)

Calculate the $R^*$ diagnostic for the data.

For a description of the classifier and kwargs, see MCMCDiagnosticTools.rstar.

source \ No newline at end of file diff --git a/InferenceObjects/dev/extensions/posteriorstats/index.html b/InferenceObjects/dev/extensions/posteriorstats/index.html index 68bf8f627..8e4535d2f 100644 --- a/InferenceObjects/dev/extensions/posteriorstats/index.html +++ b/InferenceObjects/dev/extensions/posteriorstats/index.html @@ -91,4 +91,4 @@ WAICResult with estimates elpd elpd_mcse p p_mcse -31 1.4 0.9 0.32source
StatsBase.summarystatsMethod
summarystats(data::InferenceData; group=:posterior, kwargs...) -> SummaryStats
-summarystats(data::Dataset; kwargs...) -> SummaryStats

Compute default summary statistics for the data using PosteriorStats.summarize.

source
\ No newline at end of file +summarystats(data::Dataset; kwargs...) -> SummaryStats

Compute default summary statistics for the data using PosteriorStats.summarize.

source \ No newline at end of file diff --git a/InferenceObjects/dev/index.html b/InferenceObjects/dev/index.html index 89ca23df3..505bcf47b 100644 --- a/InferenceObjects/dev/index.html +++ b/InferenceObjects/dev/index.html @@ -1 +1 @@ -Home · InferenceObjects.jl

InferenceObjects

InferenceObjects.jl is a Julia implementation of the InferenceData schema for storing results of Bayesian inference. Its purpose is to serve the following three goals:

  1. Usefulness in the analysis of Bayesian inference results.
  2. Reproducibility of Bayesian inference analysis.
  3. Interoperability between different inference backends and programming languages.

The implementation consists primarily of the InferenceData and Dataset structures. InferenceObjects also provides the function convert_to_inference_data, which may be overloaded by inference packages to define how various inference outputs can be converted to an InferenceData.

For examples of how InferenceData can be used, see the ArviZ.jl documentation.

\ No newline at end of file +Home · InferenceObjects.jl

InferenceObjects

InferenceObjects.jl is a Julia implementation of the InferenceData schema for storing results of Bayesian inference. Its purpose is to serve the following three goals:

  1. Usefulness in the analysis of Bayesian inference results.
  2. Reproducibility of Bayesian inference analysis.
  3. Interoperability between different inference backends and programming languages.

The implementation consists primarily of the InferenceData and Dataset structures. InferenceObjects also provides the function convert_to_inference_data, which may be overloaded by inference packages to define how various inference outputs can be converted to an InferenceData.

For examples of how InferenceData can be used, see the ArviZ.jl documentation.

\ No newline at end of file diff --git a/InferenceObjects/dev/inference_data/index.html b/InferenceObjects/dev/inference_data/index.html index 539b53f00..417381a76 100644 --- a/InferenceObjects/dev/inference_data/index.html +++ b/InferenceObjects/dev/inference_data/index.html @@ -195,4 +195,4 @@ > posterior julia> to_netcdf(idata, "data.nc") -"data.nc"source \ No newline at end of file +"data.nc"source \ No newline at end of file diff --git a/PSIS/dev/.documenter-siteinfo.json b/PSIS/dev/.documenter-siteinfo.json index 553fa7051..ffd288c22 100644 --- a/PSIS/dev/.documenter-siteinfo.json +++ b/PSIS/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-08T01:22:00","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-09T01:26:38","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/PSIS/dev/api/index.html b/PSIS/dev/api/index.html index 7903eae3e..18aa32994 100644 --- a/PSIS/dev/api/index.html +++ b/PSIS/dev/api/index.html @@ -40,4 +40,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 \ No newline at end of file +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 \ No newline at end of file diff --git a/PSIS/dev/index.html b/PSIS/dev/index.html index b2ea4cfd6..34b8669b2 100644 --- a/PSIS/dev/index.html +++ b/PSIS/dev/index.html @@ -13,4 +13,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.

\ No newline at end of file + (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.

\ No newline at end of file diff --git a/PSIS/dev/internal/index.html b/PSIS/dev/internal/index.html index 0f75cb5a6..15962352a 100644 --- a/PSIS/dev/internal/index.html +++ b/PSIS/dev/internal/index.html @@ -1 +1 @@ -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
\ No newline at end of file +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
\ No newline at end of file diff --git a/PSIS/dev/plotting/25bac59b.svg b/PSIS/dev/plotting/2f153655.svg similarity index 76% rename from PSIS/dev/plotting/25bac59b.svg rename to PSIS/dev/plotting/2f153655.svg index 015036e0d..62f1495f9 100644 --- a/PSIS/dev/plotting/25bac59b.svg +++ b/PSIS/dev/plotting/2f153655.svg @@ -1,124 +1,124 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PSIS/dev/plotting/index.html b/PSIS/dev/plotting/index.html index e5fac6ff1..d96295d4b 100644 --- a/PSIS/dev/plotting/index.html +++ b/PSIS/dev/plotting/index.html @@ -10,4 +10,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...).

\ No newline at end of file +plot(result; showlines=true, marker=:+, legend=false, linewidth=2)Example block output

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

\ No newline at end of file diff --git a/PSIS/dev/references/index.html b/PSIS/dev/references/index.html index e762584fa..c9233c9d8 100644 --- a/PSIS/dev/references/index.html +++ b/PSIS/dev/references/index.html @@ -1 +1 @@ -References · PSIS.jl
\ No newline at end of file +References · PSIS.jl
\ No newline at end of file