diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index c0391d2..35eda39 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-10T10:08:07","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-10T10:13:16","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index c00d76a..5a64fa5 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,9 +1,9 @@ -API reference · DifferentiableExpectations.jl

API reference

Public

DifferentiableExpectations.DifferentiableExpectationType
DifferentiableExpectation{threaded}

Abstract supertype for differentiable parametric expectations F : θ -> 𝔼[f(X)] where X ∼ p(θ), whose value and derivative are approximated with Monte-Carlo averages.

Type parameters

  • threaded::Bool: specifies whether the sampling should be performed in parallel (with OhMyThreads.jl)

Required fields

  • f: the function applied inside the expectation
  • dist_constructor: the constructor of the probability distribution, such that calling D(θ...) generates an object corresponding to p(θ)
  • rng: the random number generator
  • nb_samples: the number of Monte-Carlo samples
source
DifferentiableExpectations.FixedAtomsProbabilityDistributionType
FixedAtomsProbabilityDistribution

A probability distribution with finite support and fixed atoms.

Whenever its expectation is differentiated, only the weights are considered active, whereas the atoms are considered constant.

Fields

  • atoms::Vector

  • weights::Vector{W} where W<:Real

source
DifferentiableExpectations.REINFORCEType
REINFORCE{threaded} <: DifferentiableExpectation{threaded}

Differentiable parametric expectation F : θ -> 𝔼[f(X)] where X ∼ p(θ) using the REINFORCE (or score function) gradient estimator:

∂F(θ) = 𝔼[f(X) ∇₁logp(θ, x)ᵀ]

Constructor

REINFORCE(
+API reference · DifferentiableExpectations.jl

API reference

Public

DifferentiableExpectations.DifferentiableExpectationType
DifferentiableExpectation{threaded}

Abstract supertype for differentiable parametric expectations F : θ -> 𝔼[f(X)] where X ∼ p(θ), whose value and derivative are approximated with Monte-Carlo averages.

Type parameters

  • threaded::Bool: specifies whether the sampling should be performed in parallel (with OhMyThreads.jl)

Required fields

  • f: the function applied inside the expectation
  • dist_constructor: the constructor of the probability distribution, such that calling D(θ...) generates an object corresponding to p(θ)
  • rng: the random number generator
  • nb_samples: the number of Monte-Carlo samples
source
DifferentiableExpectations.FixedAtomsProbabilityDistributionType
FixedAtomsProbabilityDistribution

A probability distribution with finite support and fixed atoms.

Whenever its expectation is differentiated, only the weights are considered active, whereas the atoms are considered constant.

Fields

  • atoms::Vector

  • weights::Vector{W} where W<:Real

source
DifferentiableExpectations.REINFORCEType
REINFORCE{threaded} <: DifferentiableExpectation{threaded}

Differentiable parametric expectation F : θ -> 𝔼[f(X)] where X ∼ p(θ) using the REINFORCE (or score function) gradient estimator:

∂F(θ) = 𝔼[f(X) ∇₁logp(θ, x)ᵀ]

Constructor

REINFORCE(
     f,
     dist_constructor,
     dist_gradlogpdf=nothing;
     rng=Random.default_rng(),
     nb_samples=1,
     threaded=false
-)

Fields

  • f::Any

  • dist_constructor::Any

  • dist_logdensity_grad::Any

  • rng::Random.AbstractRNG

  • nb_samples::Int64

See also

source

Private

+)

Fields

  • f::Any

  • dist_constructor::Any

  • dist_logdensity_grad::Any

  • rng::Random.AbstractRNG

  • nb_samples::Int64

See also

source

Private

diff --git a/dev/index.html b/dev/index.html index 2881aa7..b07efe8 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · DifferentiableExpectations.jl
+Home · DifferentiableExpectations.jl