From 4ae5d77a90d45aba2756347253f4994daf0e164c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 10:21:11 +0000 Subject: [PATCH] Added navbar and removed insert_navbar.sh --- index.html | 1 + previews/PR2328/api/Inference/index.html | 462 +++++++++++++++++++- previews/PR2328/api/Optimisation/index.html | 461 ++++++++++++++++++- previews/PR2328/api/index.html | 462 +++++++++++++++++++- previews/PR2328/index.html | 461 ++++++++++++++++++- 5 files changed, 1841 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 6a5afc301..3ac259691 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,3 @@ + diff --git a/previews/PR2328/api/Inference/index.html b/previews/PR2328/api/Inference/index.html index 24500504b..8d7bade57 100644 --- a/previews/PR2328/api/Inference/index.html +++ b/previews/PR2328/api/Inference/index.html @@ -1,5 +1,463 @@ -Inference · Turing

API: Turing.Inference

Turing.Inference.ESSType
ESS

Elliptical slice sampling algorithm.

Examples

julia> @model function gdemo(x)
+Inference · Turing
+
+
+
+
+
+

API: Turing.Inference

Turing.Inference.ESSType
ESS

Elliptical slice sampling algorithm.

Examples

julia> @model function gdemo(x)
            m ~ Normal()
            x ~ Normal(m, 0.5)
        end
@@ -137,7 +595,6 @@
         y[1]  20.0342  20.1188  20.2135  20.2588  20.4188
         y[2]  20.1870  20.3178  20.3839  20.4466  20.5895
 
-
 julia> ys_pred = vec(mean(Array(group(predictions, :y)); dims = 1));
 
 julia> sum(abs2, ys_test - ys_pred) ≤ 0.1
@@ -168,3 +625,4 @@
 2-element Array{Array{Float64,1},1}:
  [-2.0844148956440796]
  [-1.704630494695469]
source
+ diff --git a/previews/PR2328/api/Optimisation/index.html b/previews/PR2328/api/Optimisation/index.html index b4519bf7f..f62f9b395 100644 --- a/previews/PR2328/api/Optimisation/index.html +++ b/previews/PR2328/api/Optimisation/index.html @@ -1,5 +1,463 @@ -Optimisation · Turing

API: Turing.Optimisation

SciMLBase.OptimizationProblemMethod
OptimizationProblem(log_density::OptimLogDensity, adtype, constraints)

Create an OptimizationProblem for the objective function defined by log_density.

source
Turing.Optimisation.MAPType
MAP <: ModeEstimator

Concrete type for maximum a posteriori estimation. Only used for the Optim.jl interface.

source
Turing.Optimisation.ModeEstimationConstraintsType
ModeEstimationConstraints

A struct that holds constraints for mode estimation problems.

The fields are the same as possible constraints supported by the Optimization.jl: ub and lb specify lower and upper bounds of box constraints. cons is a function that takes the parameters of the model and returns a list of derived quantities, which are then constrained by the lower and upper bounds set by lcons and ucons. We refer to these as generic constraints. Please see the documentation of Optimization.jl for more details.

Any of the fields can be nothing, disabling the corresponding constraints.

source
Turing.Optimisation.ModeEstimatorType
ModeEstimator

An abstract type to mark whether mode estimation is to be done with maximum a posteriori (MAP) or maximum likelihood estimation (MLE). This is only needed for the Optim.jl interface.

source
Turing.Optimisation.ModeResultType
ModeResult{
+Optimisation · Turing
+
+
+
+
+
+

API: Turing.Optimisation

SciMLBase.OptimizationProblemMethod
OptimizationProblem(log_density::OptimLogDensity, adtype, constraints)

Create an OptimizationProblem for the objective function defined by log_density.

source
Turing.Optimisation.MAPType
MAP <: ModeEstimator

Concrete type for maximum a posteriori estimation. Only used for the Optim.jl interface.

source
Turing.Optimisation.ModeEstimationConstraintsType
ModeEstimationConstraints

A struct that holds constraints for mode estimation problems.

The fields are the same as possible constraints supported by the Optimization.jl: ub and lb specify lower and upper bounds of box constraints. cons is a function that takes the parameters of the model and returns a list of derived quantities, which are then constrained by the lower and upper bounds set by lcons and ucons. We refer to these as generic constraints. Please see the documentation of Optimization.jl for more details.

Any of the fields can be nothing, disabling the corresponding constraints.

source
Turing.Optimisation.ModeEstimatorType
ModeEstimator

An abstract type to mark whether mode estimation is to be done with maximum a posteriori (MAP) or maximum likelihood estimation (MLE). This is only needed for the Optim.jl interface.

source
Turing.Optimisation.ModeResultType
ModeResult{
     V<:NamedArrays.NamedArray,
     M<:NamedArrays.NamedArray,
     O<:Optim.MultivariateOptimizationResults,
@@ -20,3 +478,4 @@
     [solver];
     kwargs...
 )

Find the maximum likelihood estimate of a model.

This is a convenience function that calls estimate_mode with MLE() as the estimator. Please see the documentation of Turing.Optimisation.estimate_mode for more details.

source
+ diff --git a/previews/PR2328/api/index.html b/previews/PR2328/api/index.html index 249db9d96..fd622d2be 100644 --- a/previews/PR2328/api/index.html +++ b/previews/PR2328/api/index.html @@ -1,5 +1,463 @@ -API · Turing

API

Module-wide re-exports

Turing.jl directly re-exports the entire public API of the following packages:

Please see the individual packages for their documentation.

Individual exports and re-exports

All of the following symbols are exported unqualified by Turing, even though the documentation suggests that many of them are qualified. That means, for example, you can just write

using Turing
+API · Turing
+
+
+
+
+
+

API

Module-wide re-exports

Turing.jl directly re-exports the entire public API of the following packages:

Please see the individual packages for their documentation.

Individual exports and re-exports

All of the following symbols are exported unqualified by Turing, even though the documentation suggests that many of them are qualified. That means, for example, you can just write

using Turing
 
 @model function my_model() end
 
@@ -63,8 +521,8 @@
         y[1]  20.0342  20.1188  20.2135  20.2588  20.4188
         y[2]  20.1870  20.3178  20.3839  20.4466  20.5895
 
-
 julia> ys_pred = vec(mean(Array(group(predictions, :y)); dims = 1));
 
 julia> sum(abs2, ys_test - ys_pred) ≤ 0.1
 true
source

Querying model probabilities and quantities

Please see the generated quantities and probability interface guides for more information.

Exported symbolDocumentationDescription
generated_quantitiesDynamicPPL.generated_quantitiesCalculate additional quantities defined in a model
pointwise_loglikelihoodsDynamicPPL.pointwise_loglikelihoodsCompute log likelihoods for each sample in a chain
logpriorDynamicPPL.logpriorCompute log prior probability
logjointDynamicPPL.logjointCompute log joint probability
LogDensityFunctionDynamicPPL.LogDensityFunctionWrap a Turing model to satisfy LogDensityFunctions.jl interface
conditionAbstractPPL.conditionCondition a model on data
deconditionAbstractPPL.deconditionRemove conditioning on data
conditionedDynamicPPL.conditionedReturn the conditioned values of a model
fixDynamicPPL.fixFix the value of a variable
unfixDynamicPPL.unfixUnfix the value of a variable
OrderedDictOrderedCollections.OrderedDictAn ordered dictionary

Extra re-exports from Bijectors

Note that Bijectors itself does not export ordered.

Bijectors.orderedFunction
ordered(d::Distribution)

Return a Distribution whose support are ordered vectors, i.e., vectors with increasingly ordered elements.

Specifically, d is restricted to the subspace of its domain containing only ordered elements.

Warning

rand is implemented using rejection sampling, which can be slow for high-dimensional distributions. In such cases, consider using MCMC methods to sample from the distribution instead.

Warning

The resulting ordered distribution is un-normalized, which can cause issues in some contexts, e.g. in hierarchical models where the parameters of the ordered distribution are themselves sampled. See the notes below for a more detailed discussion.

Notes on ordered being un-normalized

The resulting ordered distribution is un-normalized. This is not a problem if used in a context where the normalizing factor is irrelevant, but if the value of the normalizing factor impacts the resulting computation, the results may be inaccurate.

For example, if the distribution is used in sampling a posterior distribution with MCMC and the parameters of the ordered distribution are themselves sampled, then the normalizing factor would in general be needed for accurate sampling, and ordered should not be used. However, if the parameters are fixed, then since MCMC does not require distributions be normalized, ordered may be used without problems.

A common case is where the distribution being ordered is a joint distribution of n identical univariate distributions. In this case the normalization factor works out to be the constant n!, and ordered can again be used without problems even if the parameters of the univariate distribution are sampled.

source

Point estimates

See the mode estimation tutorial for more information.

Exported symbolDocumentationDescription
maximum_a_posterioriTuring.Optimisation.maximum_a_posterioriFind a MAP estimate for a model
maximum_likelihoodTuring.Optimisation.maximum_likelihoodFind a MLE estimate for a model
MAPTuring.Optimisation.MAPType to use with Optim.jl for MAP estimation
MLETuring.Optimisation.MLEType to use with Optim.jl for MLE estimation
+ diff --git a/previews/PR2328/index.html b/previews/PR2328/index.html index d2443332b..40afbc241 100644 --- a/previews/PR2328/index.html +++ b/previews/PR2328/index.html @@ -1,2 +1,461 @@ -Home · Turing

Turing.jl

This site contains the API documentation for the identifiers exported by Turing.jl.

If you are looking for usage examples and guides, please visit https://turinglang.org/docs.

+Home · Turing + + + + + +

Turing.jl

This site contains the API documentation for the identifiers exported by Turing.jl.

If you are looking for usage examples and guides, please visit https://turinglang.org/docs.

+