| particle_deterministic_state | R Documentation |
Deterministic particle internal state. This object is
not ordinarily constructed directly by users, but via the
$run_begin method to particle_deterministic. It
provides an advanced interface to the deterministic particle
that allows partially running over part of the time trajectory.
This state object has a number of public fields that you can read but must not write (they are not read-only so you could write them, but don't).
modelThe dust model being simulated
historyThe particle history, if created with
save_history = TRUE.
restart_stateFull model state at a series of points in
time, if the model was created with non-NULL save_restart.
This is a 3d array as described in particle_filter
log_likelihoodThe log-likelihood so far. This starts at 0 when initialised and accumulates value for each step taken.
current_time_indexThe index of the last completed step.
new()Initialise the deterministic particle state. Ordinarily this should not be called by users, and so arguments are barely documented.
particle_deterministic_state$new( pars, generator, model, data, data_split, times, has_multiple_parameters, n_threads, initial, index, compare, constant_log_likelihood, save_history, save_restart, stochastic_schedule, ode_control )
parsParameters for a single phase
generatorA dust generator object
modelIf the generator has previously been initialised
dataA particle_filter_data data object
data_splitThe same data as data but split by step
timesA matrix of time step beginning and ends
has_multiple_parametersCompute multiple likelihoods at once?
n_threadsThe number of threads to use
initialInitial condition function (or NULL)
indexIndex function (or NULL)
compareCompare function
constant_log_likelihoodConstant log likelihood function
save_historyLogical, indicating if we should save history
save_restartVector of time steps to save restart at
stochastic_scheduleVector of times to perform stochastic updates
ode_controlTuning control for stepper
run()Run the deterministic particle to the end of the data.
This is a convenience function around $step() which provides the
correct value of time_index
particle_deterministic_state$run()
step()Take a step with the deterministic particle. This moves the system forward one step within the data (which may correspond to more than one step with your model) and returns the likelihood so far.
particle_deterministic_state$step(time_index)
time_indexThe step index to move to. This is not the same as the model step, nor time, so be careful (it's the index within the data provided to the filter). It is an error to provide a value here that is lower than the current step index, or past the end of the data.
fork_multistage()Create a new deterministic_particle_state object based
on this one (same model, position in time within the data) but with
new parameters, to support the "multistage particle filter".
particle_deterministic_state$fork_multistage(model, pars, transform_state)
modelA model object
parsNew model parameters
transform_stateA function to transform the model state
from the old to the new parameter set. See
multistage_epoch() for details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.