A model augmented with parameter perturbations for iterated filtering.
tfp.experimental.sequential.IteratedFilter(
parameter_prior,
parameterized_initial_state_prior_fn,
parameterized_transition_fn,
parameterized_observation_fn,
parameterized_initial_state_proposal_fn=None,
parameterized_proposal_fn=None,
parameter_constraining_bijector=None,
name=None
)
Methods
estimate_parameters
estimate_parameters(
observations,
num_iterations,
num_particles,
initial_perturbation_scale,
cooling_schedule,
seed=None,
name=None,
**kwargs
)
Runs multiple iterations of filtering following a cooling schedule.
Args | |
---|---|
observations
|
observed Tensor value(s) on which to condition the
parameter estimate.
|
num_iterations
|
int Tensor number of filtering iterations to run.
|
num_particles
|
scalar int Tensor number of particles to use.
|
initial_perturbation_scale
|
scalar float Tensor , or any structure of
float Tensor s broadcasting to the same shape as the (unconstrained)
parameters, specifying the scale (standard deviation) of Gaussian
perturbations to each parameter at the first timestep.
|
cooling_schedule
|
callable with signature
cooling_factor = cooling_schedule(iteration) for iteration in
[0, ..., num_iterations - 1] . The filter is
invoked with perturbations of scale
initial_perturbation_scale * cooling_schedule(iteration) .
|
seed
|
PRNG seed; see tfp.random.sanitize_seed for details.
|
name
|
str name for ops constructed by this method.
|
**kwargs
|
additional keyword arguments passed to
tfp.experimental.mcmc.infer_trajectories .
|
Returns | |
---|---|
final_parameter_particles
|
structure of Tensor s matching
self.parameter_prior , each with batch shape
[num_iterations, num_particles] . These are the populations
of particles representing the parameter estimate after each iteration
of filtering.
|
joint_initial_state_proposal
joint_initial_state_proposal(
initial_unconstrained_parameters=None
)
Proposal to initialize the model with given parameter particles.
one_step
one_step(
observations,
perturbation_scale,
num_particles,
initial_unconstrained_parameters=None,
seed=None,
name=None,
**kwargs
)
Runs one step of filtering to sharpen parameter estimates.
Args | |
---|---|
observations
|
observed Tensor value(s) on which to condition the
parameter estimate.
|
perturbation_scale
|
scalar float Tensor , or any structure of float
Tensor s broadcasting to the same shape as the unconstrained
parameters, specifying the scale (standard deviation) of Gaussian
perturbations to each parameter at each timestep.
|
num_particles
|
scalar int Tensor number of particles to use. Must match
the batch dimension of initial_unconstrained_parameters , if specified.
|
initial_unconstrained_parameters
|
optional structure of Tensor s, of
shape matching
self.joint_initial_state_prior.sample([
num_particles]).unconstrained_parameters ,
used to initialize the filter.
Default value: None .
|
seed
|
PRNG seed; see tfp.random.sanitize_seed for details.
|
name
|
str name for ops constructed by this method.
|
**kwargs
|
additional keyword arguments passed to
tfp.experimental.mcmc.infer_trajectories .
|
Returns | |
---|---|
final_unconstrained_parameters
|
structure of Tensor s matching
initial_unconstrained_parameters , containing samples of
unconstrained parameters at the final timestep, as computed by
self.filter_fn .
|