diff --git a/index.html b/index.html index 1a6cc11..83aa121 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,3 @@ + diff --git a/previews/PR100/api/index.html b/previews/PR100/api/index.html index e6a44d4..76a2a79 100644 --- a/previews/PR100/api/index.html +++ b/previews/PR100/api/index.html @@ -1,5 +1,463 @@ -API · AbstractPPL

API

VarNames

AbstractPPL.VarNameType
VarName{sym}(optic=identity)

A variable identifier for a symbol sym and optic optic.

The Julia variable in the model corresponding to sym can refer to a single value or to a hierarchical array structure of univariate, multivariate or matrix variables. The field lens stores the indices requires to access the random variable from the Julia variable indicated by sym as a tuple of tuples. Each element of the tuple thereby contains the indices of one optic operation.

VarNames can be manually constructed using the VarName{sym}(optic) constructor, or from an optic expression through the @varname convenience macro.

Examples

julia> vn = VarName{:x}(Accessors.IndexLens((Colon(), 1)) ⨟ Accessors.IndexLens((2, )))
+API · AbstractPPL
+
+
+
+
+
+

API

VarNames

AbstractPPL.VarNameType
VarName{sym}(optic=identity)

A variable identifier for a symbol sym and optic optic.

The Julia variable in the model corresponding to sym can refer to a single value or to a hierarchical array structure of univariate, multivariate or matrix variables. The field lens stores the indices requires to access the random variable from the Julia variable indicated by sym as a tuple of tuples. Each element of the tuple thereby contains the indices of one optic operation.

VarNames can be manually constructed using the VarName{sym}(optic) constructor, or from an optic expression through the @varname convenience macro.

Examples

julia> vn = VarName{:x}(Accessors.IndexLens((Colon(), 1)) ⨟ Accessors.IndexLens((2, )))
 x[:, 1][2]
 
 julia> getoptic(vn)
@@ -102,3 +560,4 @@
 
 julia> y = ones(2); vn_to_string(@varname(y[:], true))
 "(sym = "y", optic = (type = "index", indices = "(ConcretizedSlice(Base.OneTo(2)),)"))"
source
AbstractPPL.vn_from_stringFunction
vn_from_string(str)

Convert a string representation of a VarName back to a VarName. The string should have been generated by vn_to_string.

Warning

This function should only be used with trusted input, as it uses eval

and Meta.parse to parse the string.

source

Abstract model functions

AbstractPPL.conditionFunction
condition(model, observations)

Condition the generative model model on some observed data, creating a new model of the (possibly unnormalized) posterior distribution over them.

observations can be of any supported internal trace type, or a fixed probability expression.

The invariant

m = decondition(condition(m, obs))

should hold for generative models m and arbitrary obs.

source
AbstractPPL.deconditionFunction
decondition(conditioned_model)

Remove the conditioning (i.e., observation data) from conditioned_model, turning it into a generative model over prior and observed variables.

The invariant

m == condition(decondition(m), obs)

should hold for models m with conditioned variables obs.

source
DensityInterface.logdensityofFunction
logdensityof(model, trace)

Evaluate the (possibly unnormalized) density of the model specified by the probabilistic program in model, at specific values for the random variables given through trace.

trace can be of any supported internal trace type, or a fixed probability expression.

logdensityof should interact with conditioning and deconditioning in the way required by probability theory.

source

Abstract traces

+ diff --git a/previews/PR100/index.html b/previews/PR100/index.html index e0d86d6..2959b92 100644 --- a/previews/PR100/index.html +++ b/previews/PR100/index.html @@ -1,2 +1,461 @@ -Home · AbstractPPL

AbstractPPL.jl

A lightweight package containing interfaces and associated APIs for modelling languages for probabilistic programming.

+Home · AbstractPPL + + + + + +

AbstractPPL.jl

A lightweight package containing interfaces and associated APIs for modelling languages for probabilistic programming.

+