Skip to content

Commit 7b892c6

Browse files
committed
typos
1 parent 4d4da56 commit 7b892c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/elbo.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ It generates n_MC samples for each site, and uses these to compute the
55
expected value of the likelihood of observations.
66
77
## Arguments
8-
- rng: random number generator (ignored on CUDA, if ϕ is a AbstactGPUArray)
8+
- rng: random number generator (ignored on CUDA, if ϕ is a AbstractGPUArray)
99
- g: machine learnig model
1010
- f: mechanistic model
1111
- ϕ: flat vector of parameters
1212
including parameter of f (ϕ_P), of g (ϕ_Ms), and of VI (ϕ_unc),
1313
interpreted by interpreters.μP_ϕg_unc and interpreters.PMs
1414
- y_ob: matrix of observations (n_obs x n_site_batch)
1515
- x: matrix of covariates (n_cov x n_site_batch)
16-
- transPMs: Transformations with componets P, Ms, similar to interpreters
16+
- transPMs: Transformations with components P, Ms, similar to interpreters
1717
- n_MC: number of MonteCarlo samples from the distribution of parameters to simulate
1818
using the mechanistic model f.
1919
- logσ2y: observation uncertainty (log of the variance)
@@ -38,7 +38,7 @@ end
3838
get_transPMs, get_ca_int_PMs, n_sample_pred=200,
3939
gpu_data_handler=get_default_GPUHandler())
4040
41-
Prediction function for hybrid model. Retuns an Array `(n_obs, n_site, n_sample_pred)`.
41+
Prediction function for hybrid model. Returns an Array `(n_obs, n_site, n_sample_pred)`.
4242
"""
4343
function predict_gf(rng, g, f, ϕ::AbstractVector, xM::AbstractMatrix, interpreters;
4444
get_transPMs, get_ca_int_PMs, n_sample_pred=200,
@@ -81,7 +81,7 @@ function generate_ζ(rng, g, f, ϕ::AbstractVector, x::AbstractMatrix,
8181
end
8282

8383
"""
84-
Extract relevant parameters from θ and return n_MC generted draws
84+
Extract relevant parameters from θ and return n_MC generated draws
8585
together with the logdet of the transformation.
8686
8787
Necessary typestable information on number of compponents are provided with

test/test_logden_normal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using LinearAlgebra
1212
logden_norm_l(y, μ, logσ) = -1 / 2 .* (2 .* logσ .+ abs2.(y .- μ) ./ abs2.(exp.(logσ)))
1313
neg_logden_norm_l2(y, μ, logσ2) = (logσ2 .+ abs2.(y .- μ) .* exp.(-logσ2)) ./ 2
1414

15-
# first test that neg_logden_norm_l2 retuns values of logpdf(Normal) up to an additive
15+
# first test that neg_logden_norm_l2 returns values of logpdf(Normal) up to an additive
1616
μ = [1.0, 1.0]
1717
σ = [1.1, 2.0]
1818
logσ2 = log.(abs2.(σ))

0 commit comments

Comments
 (0)