class_docstr: State-Centric EKF (Extended Kalman Filter) for use with either an NCP
  (Nearly-Constant Position) or NCV (Nearly-Constant Velocity) target dynamic
  model. Stores a target dynamic model, state estimate, and state time.
  Incoming ``Measurement`` provide sensor information for updates.
  
  .. warning:: For efficiency, the dynamic model is only shallow-copied. Make
      a deep copy outside as necessary to protect against unexpected changes.
  
  :param dynamic_model: target dynamic model.
  :param mean: mean of target state estimate.
  :param cov: covariance of target state estimate.
  :param time: time of state estimate.
class_docstr_tok: ["State-Centric","EKF","(","Extended","Kalman","Filter",")","for","use","with","either","an","NCP","(","Nearly-Constant","Position",")","or","NCV","(","Nearly-Constant","Velocity",")","target","dynamic","model",".","Stores","a","target","dynamic","model",",","state","estimate",",","and","state","time",".","Incoming","``","Measurement","``","provide","sensor","information","for","updates",".","..","warning",":",":","For","efficiency",",","the","dynamic","model","is","only","shallow-copied",".","Make","a","deep","copy","outside","as","necessary","to","protect","against","unexpected","changes",".",":","param","dynamic_model",":","target","dynamic","model",".",":","param","mean",":","mean","of","target","state","estimate",".",":","param","cov",":","covariance","of","target","state","estimate",".",":","param","time",":","time","of","state","estimate","."]
docstr: Compute and return the innovation that a measurement would induce if
  it were used for an update, but don't actually perform the update.
  Assumes state and measurement are time-aligned. Useful for computing
  Chi^2 stats and likelihoods.
  
  :param measurement: measurement
  :return: Innovation mean and covariance of hypothetical update.
  :rtype: tuple(``torch.Tensor``, ``torch.Tensor``)
docstr_tok: ["Compute","and","return","the","innovation","that","a","measurement","would","induce","if","it","were","used","for","an","update",",","but","do","n't","actually","perform","the","update",".","Assumes","state","and","measurement","are","time-aligned",".","Useful","for","computing","Chi^2","stats","and","likelihoods",".",":","param","measurement",":","measurement",":","return",":","Innovation","mean","and","covariance","of","hypothetical","update",".",":","rtype",":","tuple","(","``","torch.Tensor","``",",","``","torch.Tensor","``",")"]
code: def innovation(self, measurement):
      """
      Compute and return the innovation that a measurement would induce if
      it were used for an update, but don't actually perform the update.
      Assumes state and measurement are time-aligned. Useful for computing
      Chi^2 stats and likelihoods.
  
      :param measurement: measurement
      :return: Innovation mean and covariance of hypothetical update.
      :rtype: tuple(``torch.Tensor``, ``torch.Tensor``)
      """
      assert (
          self._time == measurement.time
      ), "State time and measurement time must be aligned!"
  
      # Compute innovation.
      x_pv = self._dynamic_model.mean2pv(self._mean)
      H = measurement.jacobian(x_pv)[:, : self.dimension]
      R = measurement.cov
      z = measurement.mean
      z_predicted = measurement(x_pv)
      dz = measurement.geodesic_difference(z, z_predicted)
      S = H.mm(self._cov).mm(H.transpose(-1, -2)) + R  # innovation cov
  
      return dz, S
  
file_path: pyro/pyro/contrib/tracking/extended_kalman_filter.py
imports: import torch
  from torch.distributions.utils import lazy_property
  import pyro.distributions
  from pyro.distributions.util import eye_like
label_desc: Use image node_id 12 for calling the EKFState obj's underlying member method code with example usage: obj.innovation(measurement) and returns: dz,  S