Skip to content

Commit

Permalink
fix ScoreGradELBO outdated docs and removed unused parametric type
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Portal committed Nov 5, 2024
1 parent f030d14 commit 2577dce
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/objectives/elbo/scoregradelbo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,15 @@ Evidence lower-bound objective computed with score function gradients.
\\end{aligned}
```
To reduce the variance of the gradient estimator, we use a baseline computed from a running average of the previous ELBO values and subtract it from the objective.
```math
\\mathbb{E}_{z \\sim q_{\\lambda}}\\left[
\\nabla_{\\lambda} \\log q_{\\lambda}(z) \\left(\\pi\\left(z\\right) - \\beta\\right)
\\right]
```
# Arguments
- `n_samples::Int`: Number of Monte Carlo samples used to estimate the ELBO.
# Keyword Arguments
- `entropy`: The estimator for the entropy term. (Type `<: AbstractEntropyEstimator`; Default: `FullMonteCarloEntropy()`)
- `baseline_window_size::Int`: The window size to use to compute the baseline. (Default: `10`)
# Requirements
- The variational approximation ``q_{\\lambda}`` implements `rand` and `logpdf`.
- `logpdf(q, x)` must be differentiable with respect to `q` by the selected AD backend.
- The target distribution and the variational approximation have the same support.
Depending on the options, additional requirements on ``q_{\\lambda}`` may apply.
"""
struct ScoreGradELBO{EntropyEst<:AbstractEntropyEstimator} <: AbstractVariationalObjective
struct ScoreGradELBO <: AbstractVariationalObjective
n_samples::Int
end

Expand Down

0 comments on commit 2577dce

Please sign in to comment.