Skip to content

Commit

Permalink
add a method a update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed Jan 3, 2023
1 parent dc2a987 commit 9fd9188
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,6 @@ nothing # hide

Since we have only updated $G$'s specification, only this model is fitted again.

### Scenario N
### General behaviour

Feel free to play around with the cache and to report any non consistent behaviour.
Any change to either the `Parameter` of interest or the `NuisanceSpec` structures will trigger an update of the cache.
11 changes: 11 additions & 0 deletions src/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,15 @@ while potentially reusing cached nuisance parameters.
function tmle!(cache::TMLECache, Ψ::Parameter, η_spec::NuisanceSpec; verbosity=1, threshold=1e-8)
update!(cache, Ψ, η_spec)
tmle!(cache, verbosity=verbosity, threshold=threshold)
end

"""
tmle!(cache::TMLECache, η_spec::NuisanceSpec, Ψ::Parameter; verbosity=1, threshold=1e-8)
Runs the TMLE procedure for the new parameter Ψ and the new nuisance parameters specification η_spec
while potentially reusing cached nuisance parameters.
"""
function tmle!(cache::TMLECache, η_spec::NuisanceSpec, Ψ::Parameter; verbosity=1, threshold=1e-8)
update!(cache, Ψ, η_spec)
tmle!(cache, verbosity=verbosity, threshold=threshold)
end

0 comments on commit 9fd9188

Please sign in to comment.