From 57cef70af7f8d586a0828786610282ae9d1a02b6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 2 Jan 2024 00:32:15 +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 +- 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/{a93f58f7.svg => 77ed03b0.svg} | 218 +++++++++--------- PSIS/dev/plotting/index.html | 2 +- 15 files changed, 123 insertions(+), 123 deletions(-) rename PSIS/dev/plotting/{a93f58f7.svg => 77ed03b0.svg} (76%) diff --git a/ArviZExampleData/dev/.documenter-siteinfo.json b/ArviZExampleData/dev/.documenter-siteinfo.json index 2de533cf8..a9868ed00 100644 --- a/ArviZExampleData/dev/.documenter-siteinfo.json +++ b/ArviZExampleData/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2023-12-31T01:17:41","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-01T01:19:15","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/ArviZExampleData/dev/api/index.html b/ArviZExampleData/dev/api/index.html index 3f4e24836..6e9a0f9da 100644 --- a/ArviZExampleData/dev/api/index.html +++ b/ArviZExampleData/dev/api/index.html @@ -30,4 +30,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 2dd28c43a..ded46e705 100644 --- a/ArviZExampleData/dev/datasets/index.html +++ b/ArviZExampleData/dev/datasets/index.html @@ -87,4 +87,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 0776a1a5e..d7c116daf 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 e5f3ee5c6..47cae7424 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 f9763cf49..c7a477de1 100644 --- a/InferenceObjects/dev/.documenter-siteinfo.json +++ b/InferenceObjects/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2023-12-31T00:45:27","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-01T00:46:42","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/InferenceObjects/dev/dataset/index.html b/InferenceObjects/dev/dataset/index.html index 31beb26a1..93f7ea7dc 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/index.html b/InferenceObjects/dev/index.html index d647403ae..45f68d8a6 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 8bda0d71c..29f16007f 100644 --- a/InferenceObjects/dev/inference_data/index.html +++ b/InferenceObjects/dev/inference_data/index.html @@ -190,4 +190,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 ed3ac934c..b54ba577f 100644 --- a/PSIS/dev/.documenter-siteinfo.json +++ b/PSIS/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2023-12-31T00:44:07","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-01T00:45:33","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/PSIS/dev/api/index.html b/PSIS/dev/api/index.html index 8a48b2e71..9af33ac2d 100644 --- a/PSIS/dev/api/index.html +++ b/PSIS/dev/api/index.html @@ -6,4 +6,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 0489ea977..2958d3bd7 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 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.

\ 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 4e7fc11c2..6ec36b086 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.

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
\ No newline at end of file +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
\ No newline at end of file diff --git a/PSIS/dev/plotting/a93f58f7.svg b/PSIS/dev/plotting/77ed03b0.svg similarity index 76% rename from PSIS/dev/plotting/a93f58f7.svg rename to PSIS/dev/plotting/77ed03b0.svg index ff48a3ba3..7c2603fff 100644 --- a/PSIS/dev/plotting/a93f58f7.svg +++ b/PSIS/dev/plotting/77ed03b0.svg @@ -1,124 +1,124 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PSIS/dev/plotting/index.html b/PSIS/dev/plotting/index.html index f0bac4626..ee0218b63 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 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...).

\ 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