Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mcmc/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export InferenceAlgorithm,
externalsampler

###############################################
# Abstract inferface for inference algorithms #
# Abstract interface for inference algorithms #
###############################################

include("algorithm.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/mcmc/gibbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ end
match_linking!!(varinfo_local, prev_state_local, model)

Make sure the linked/invlinked status of varinfo_local matches that of the previous
state for this sampler. This is relevant when multilple samplers are sampling the same
state for this sampler. This is relevant when multiple samplers are sampling the same
variables, and one might need it to be linked while the other doesn't.
"""
function match_linking!!(varinfo_local, prev_state_local, model)
Expand Down
8 changes: 4 additions & 4 deletions src/mcmc/particle_mcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ function DynamicPPL.initialstep(

# Pick a particle to be retained.
Ws = AdvancedPS.getweights(particles)
indx = AdvancedPS.randcat(rng, Ws)
reference = particles.vals[indx]
index = AdvancedPS.randcat(rng, Ws)
reference = particles.vals[index]

# Compute the first transition.
_vi = reference.model.f.varinfo
Expand Down Expand Up @@ -373,8 +373,8 @@ function AbstractMCMC.step(

# Pick a particle to be retained.
Ws = AdvancedPS.getweights(particles)
indx = AdvancedPS.randcat(rng, Ws)
newreference = particles.vals[indx]
index = AdvancedPS.randcat(rng, Ws)
newreference = particles.vals[index]

# Compute the transition.
_vi = newreference.model.f.varinfo
Expand Down
2 changes: 1 addition & 1 deletion test/ext/OptimInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ using Turing
# Some of the models have one variance parameter per observation, and so
# the MLE should have the variances set to 0. Since we're working in
# transformed space, this corresponds to `-Inf`, which is of course not achievable.
# In particular, it can result in "early termniation" of the optimization process
# In particular, it can result in "early termination" of the optimization process
# because we hit NaNs, etc. To avoid this, we set the `g_tol` and the `f_tol` to
# something larger than the default.
allowed_incorrect_mle = [
Expand Down
2 changes: 1 addition & 1 deletion test/mcmc/gibbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ end
# As above but different samplers and using kwargs.
s3 = Gibbs(:s => CSMC(3), :m => HMCDA(200, 0.65, 0.15))
s4 = Gibbs(@varname(s) => HMC(0.1, 5), @varname(m) => ESS())
# Multiple instnaces of the same sampler. This implements running, in this case,
# Multiple instances of the same sampler. This implements running, in this case,
# 3 steps of HMC on m and 2 steps of PG on m in every iteration of Gibbs.
s5 = begin
hmc = HMC(0.1, 5)
Expand Down
2 changes: 1 addition & 1 deletion test/optimisation/Optimisation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ using Turing
# Some of the models have one variance parameter per observation, and so
# the MLE should have the variances set to 0. Since we're working in
# transformed space, this corresponds to `-Inf`, which is of course not achievable.
# In particular, it can result in "early termniation" of the optimization process
# In particular, it can result in "early termination" of the optimization process
# because we hit NaNs, etc. To avoid this, we set the `g_tol` and the `f_tol` to
# something larger than the default.
allowed_incorrect_mle = [
Expand Down
Loading