Skip to content

Commit

Permalink
Rename log_prob_oldy to log_prob_old_data
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwilliam77 committed Jun 21, 2021
1 parent 5cdf1e1 commit 418dc24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/smc_main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr
take their regime 1 values at the end of the loglikelihood computation and set `toggle = false`.
- `debug_assertion::Bool = false`: if true, then when an assertion error is thrown during the estimation,
output is created in a JLD2 file to help the user debug the problem.
- `log_prob_oldy::Float64 = 0.0`: Log MDD of old y for correct incremental weights when bridging
- `log_prob_old_data::Float64 = 0.0`: Log MDD of old data for correct incremental weights when bridging
### Outputs
Expand Down Expand Up @@ -158,7 +158,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr
regime_switching::Bool = false,
toggle::Bool = true,
debug_assertion::Bool = false,
log_prob_oldy::Float64 = 0.0) where {S<:AbstractFloat, U<:Number}
log_prob_old_data::Float64 = 0.0) where {S<:AbstractFloat, U<:Number}

########################################################################################
### Settings
Expand Down Expand Up @@ -404,7 +404,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr
elseif tempered_update_prior_weight == 1.0
incremental_weights = exp.((ϕ_n - ϕ_n1) * get_loglh(cloud))
else
incremental_weights = exp.((ϕ_n1 - ϕ_n) * log.((exp.(get_old_loglh(cloud) .- log_prob_oldy .+
incremental_weights = exp.((ϕ_n1 - ϕ_n) * log.((exp.(get_old_loglh(cloud) .- log_prob_old_data .+
log(1-tempered_update_prior_weight)) .+ tempered_update_prior_weight)) +
(ϕ_n - ϕ_n1) * get_loglh(cloud))
end
Expand Down

2 comments on commit 418dc24

@chenwilliam77
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/39337

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.15 -m "<description of version>" 418dc24b82dda1454956b7f01ea198c707a0979d
git push origin v0.1.15

Please sign in to comment.