class_docstr: A model augmented with parameter perturbations for iterated filtering.
class_docstr_tok: ["A","model","augmented","with","parameter","perturbations","for","iterated","filtering","."]
docstr: 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.
docstr_tok: ["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","."]
code: def estimate_parameters(
      self,
      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.
      """
      with self._name_scope(name or "estimate_parameters"):
          step_seed, initial_seed = samplers.split_seed(seed)
          initial_perturbation_scale = tf.convert_to_tensor(
              initial_perturbation_scale,
              name="initial_perturbation_scale",
          )
  
          # Get initial parameter particles from the first filtering iteration.
          initial_unconstrained_parameters = self.one_step(
              observations=observations,
              num_particles=num_particles,
              perturbation_scale=initial_perturbation_scale,
              seed=step_seed,
              **kwargs,
          )
  
          # Run the remaining iterations and accumulate the results.
          @tf.function(autograph=False)
          def loop_body(
              unconstrained_parameters_seed, cooling_fraction
          ):
              (
                  unconstrained_parameters,
                  seed,
              ) = unconstrained_parameters_seed
              step_seed, seed = samplers.split_seed(seed)
              return (
                  self.one_step(
                      observations=observations,
                      num_particles=num_particles,
                      perturbation_scale=tf.nest.map_structure(
                          lambda s: cooling_fraction * s,
                          initial_perturbation_scale,
                      ),
                      initial_unconstrained_parameters=unconstrained_parameters,
                      seed=step_seed,
                      **kwargs,
                  ),
                  seed,
              )
  
          estimated_unconstrained_parameters, _ = tf.scan(
              fn=loop_body,
              elems=cooling_schedule(ps.range(1, num_iterations)),
              initializer=(
                  initial_unconstrained_parameters,
                  initial_seed,
              ),
          )
  
          return self.parameter_constraining_bijector.forward(
              estimated_unconstrained_parameters
          )
  
imports: import collections
  import contextlib
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.mcmc.particle_filter import infer_trajectories
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 14 for calling the IteratedFilter obj's underlying member method code with example usage: obj.estimate_parameters(observations, num_iterations, num_particles, initial_perturbation_scale, cooling_schedule, seed, name) and returns: self, self,  seed