class_docstr: Fixed Lag Kalman smoother.
  
  Computes a smoothed sequence from a set of measurements based on the
  fixed lag Kalman smoother. At time k, for a lag N, the fixed-lag smoother
  computes the state estimate for time k-N based on all measurements made
  between times k-N and k. This yields a pretty good smoothed result with
  O(N) extra computations performed for each measurement. In other words,
  if N=4 this will consume about 5x the number of computations as a
  basic Kalman filter. However, the loops contain only 3 dot products, so it
  will be much faster than this sounds as the main Kalman filter loop
  involves transposes and inverses, as well as many more matrix
  multiplications.
  
  Implementation based on Wikipedia article as it existed on
  November 18, 2014.
  
  
  Examples
  --------
  
  .. code-block:: Python
  
      from filterpy.kalman import FixedLagSmoother
      fls = FixedLagSmoother(dim_x=2, dim_z=1)
  
      fls.x = np.array([[0.],
                        [.5]])
  
      fls.F = np.array([[1.,1.],
                        [0.,1.]])
  
      fls.H = np.array([[1.,0.]])
  
      fls.P *= 200
      fls.R *= 5.
      fls.Q *= 0.001
  
      zs = [...some measurements...]
      xhatsmooth, xhat = fls.smooth_batch(zs, N=4)
  
  
  See my book Kalman and Bayesian Filters in Python
  https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python
  
  
  References
  ----------
  
  Wikipedia http://en.wikipedia.org/wiki/Kalman_filter#Fixed-lag_smoother
  
  Simon, Dan. "Optimal State Estimation," John Wiley & Sons pp 274-8 (2006).
  
  |
  |
class_docstr_tok: ["Fixed","Lag","Kalman","smoother",".","Computes","a","smoothed","sequence","from","a","set","of","measurements","based","on","the","fixed","lag","Kalman","smoother",".","At","time","k",",","for","a","lag","N",",","the","fixed-lag","smoother","computes","the","state","estimate","for","time","k-N","based","on","all","measurements","made","between","times","k-N","and","k.","This","yields","a","pretty","good","smoothed","result","with","O","(","N",")","extra","computations","performed","for","each","measurement",".","In","other","words",",","if","N=4","this","will","consume","about","5x","the","number","of","computations","as","a","basic","Kalman","filter",".","However",",","the","loops","contain","only","3","dot","products",",","so","it","will","be","much","faster","than","this","sounds","as","the","main","Kalman","filter","loop","involves","transposes","and","inverses",",","as","well","as","many","more","matrix","multiplications",".","Implementation","based","on","Wikipedia","article","as","it","existed","on","November","18",",","2014",".","Examples","--","--","--","--","..","code-block",":",":","Python","from","filterpy.kalman","import","FixedLagSmoother","fls","=","FixedLagSmoother","(","dim_x=2",",","dim_z=1",")","fls.x","=","np.array","(","[","[","0",".","]",",","[",".5","]","]",")","fls.F","=","np.array","(","[","[","1.,1",".","]",",","[","0.,1",".","]","]",")","fls.H","=","np.array","(","[","[","1.,0",".","]","]",")","fls.P","*","=","200","fls.R","*","=","5.","fls.Q","*","=","0.001","zs","=","[","...","some","measurements","...","]","xhatsmooth",",","xhat","=","fls.smooth_batch","(","zs",",","N=4",")","See","my","book","Kalman","and","Bayesian","Filters","in","Python","https",":","\/\/github.com\/rlabbe\/Kalman-and-Bayesian-Filters-in-Python","References","--","--","--","--","--","Wikipedia","http",":","\/\/en.wikipedia.org\/wiki\/Kalman_filter","#","Fixed-lag_smoother","Simon",",","Dan",".","``","Optimal","State","Estimation",",","''","John","Wiley","&","Sons","pp","274-8","(","2006",")",".","|","|"]
code: def __repr__(self):
      return "\n".join(
          [
              "FixedLagSmoother object",
              pretty_str("dim_x", self.x),
              pretty_str("dim_z", self.x),
              pretty_str("N", self.N),
              pretty_str("x", self.x),
              pretty_str("x_s", self.x_s),
              pretty_str("P", self.P),
              pretty_str("F", self.F),
              pretty_str("Q", self.Q),
              pretty_str("R", self.R),
              pretty_str("H", self.H),
              pretty_str("K", self.K),
              pretty_str("y", self.y),
              pretty_str("S", self.S),
              pretty_str("B", self.B),
          ]
      )
  
file_path: filterpy/filterpy/kalman/fixed_lag_smoother.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  from numpy import dot, zeros, eye
  from scipy.linalg import inv
  from filterpy.common import pretty_str
label_desc: Use image node_id 4 for calling the FixedLagSmoother obj's underlying member method code with example usage: obj.__repr__() and returns: str