class_docstr: Implements the g-h filter. The topic is too large to cover in
  this comment. See my book "Kalman and Bayesian Filters in Python" [1]
  or Eli Brookner's "Tracking and Kalman Filters Made Easy" [2].
  
  A few basic examples are below, and the tests in ./gh_tests.py may
  give you more ideas on use.
  
  
  Parameters
  ----------
  
  x : 1D np.array or scalar
      Initial value for the filter state. Each value can be a scalar
      or a np.array.
  
      You can use a scalar for x0. If order > 0, then 0.0 is assumed
      for the higher order terms.
  
      x[0] is the value being tracked
      x[1] is the first derivative (for order 1 and 2 filters)
      x[2] is the second derivative (for order 2 filters)
  
  dx : 1D np.array or scalar
      Initial value for the derivative of the filter state.
  
  dt : scalar
      time step
  
  g : float
      filter g gain parameter.
  
  h : float
      filter h gain parameter.
  
  
  Attributes
  ----------
  x : 1D np.array or scalar
      filter state
  
  dx : 1D np.array or scalar
     derivative of the filter state.
  
  x_prediction : 1D np.array or scalar
      predicted filter state
  
  dx_prediction : 1D np.array or scalar
     predicted derivative of the filter state.
  
  dt : scalar
      time step
  
  g : float
      filter g gain parameter.
  
  h : float
      filter h gain parameter.
  
  y : np.array, or scalar
      residual (difference between measurement and prior)
  
  z : np.array, or scalar
      measurement passed into update()
  
  Examples
  --------
  
  Create a basic filter for a scalar value with g=.8, h=.2.
  Initialize to 0, with a derivative(velocity) of 0.
  
  >>> from filterpy.gh import GHFilter
  >>> f = GHFilter (x=0., dx=0., dt=1., g=.8, h=.2)
  
  Incorporate the measurement of 1
  
  >>> f.update(z=1)
  (0.8, 0.2)
  
  Incorporate a measurement of 2 with g=1 and h=0.01
  
  >>> f.update(z=2, g=1, h=0.01)
  (2.0, 0.21000000000000002)
  
  Create a filter with two independent variables.
  
  >>> from numpy import array
  >>> f = GHFilter (x=array([0,1]), dx=array([0,0]), dt=1, g=.8, h=.02)
  
  and update with the measurements (2,4)
  
  >>> f.update(array([2,4])
  (array([ 1.6,  3.4]), array([ 0.04,  0.06]))
  
  
  References
  ----------
  
  [1] Labbe, "Kalman and Bayesian Filters in Python"
  http://rlabbe.github.io/Kalman-and-Bayesian-Filters-in-Python
  
  [2] Brookner, "Tracking and Kalman Filters Made Easy". John Wiley and
  Sons, 1998.
class_docstr_tok: ["Implements","the","g-h","filter",".","The","topic","is","too","large","to","cover","in","this","comment",".","See","my","book","``","Kalman","and","Bayesian","Filters","in","Python","''","[","1","]","or","Eli","Brookner","'s","``","Tracking","and","Kalman","Filters","Made","Easy","''","[","2","]",".","A","few","basic","examples","are","below",",","and","the","tests","in",".\/gh_tests.py","may","give","you","more","ideas","on","use",".","Parameters","--","--","--","--","--","x",":","1D","np.array","or","scalar","Initial","value","for","the","filter","state",".","Each","value","can","be","a","scalar","or","a","np.array",".","You","can","use","a","scalar","for","x0",".","If","order",">","0",",","then","0.0","is","assumed","for","the","higher","order","terms",".","x","[","0","]","is","the","value","being","tracked","x","[","1","]","is","the","first","derivative","(","for","order","1","and","2","filters",")","x","[","2","]","is","the","second","derivative","(","for","order","2","filters",")","dx",":","1D","np.array","or","scalar","Initial","value","for","the","derivative","of","the","filter","state",".","dt",":","scalar","time","step","g",":","float","filter","g","gain","parameter",".","h",":","float","filter","h","gain","parameter",".","Attributes","--","--","--","--","--","x",":","1D","np.array","or","scalar","filter","state","dx",":","1D","np.array","or","scalar","derivative","of","the","filter","state",".","x_prediction",":","1D","np.array","or","scalar","predicted","filter","state","dx_prediction",":","1D","np.array","or","scalar","predicted","derivative","of","the","filter","state",".","dt",":","scalar","time","step","g",":","float","filter","g","gain","parameter",".","h",":","float","filter","h","gain","parameter",".","y",":","np.array",",","or","scalar","residual","(","difference","between","measurement","and","prior",")","z",":","np.array",",","or","scalar","measurement","passed","into","update","(",")","Examples","--","--","--","--","Create","a","basic","filter","for","a","scalar","value","with","g=.8",",","h=.2",".","Initialize","to","0",",","with","a","derivative","(","velocity",")","of","0",".",">",">",">","from","filterpy.gh","import","GHFilter",">",">",">","f","=","GHFilter","(","x=0.",",","dx=0.",",","dt=1.",",","g=.8",",","h=.2",")","Incorporate","the","measurement","of","1",">",">",">","f.update","(","z=1",")","(","0.8",",","0.2",")","Incorporate","a","measurement","of","2","with","g=1","and","h=0.01",">",">",">","f.update","(","z=2",",","g=1",",","h=0.01",")","(","2.0",",","0.21000000000000002",")","Create","a","filter","with","two","independent","variables",".",">",">",">","from","numpy","import","array",">",">",">","f","=","GHFilter","(","x=array","(","[","0,1","]",")",",","dx=array","(","[","0,0","]",")",",","dt=1",",","g=.8",",","h=.02",")","and","update","with","the","measurements","(","2,4",")",">",">",">","f.update","(","array","(","[","2,4","]",")","(","array","(","[","1.6",",","3.4","]",")",",","array","(","[","0.04",",","0.06","]",")",")","References","--","--","--","--","--","[","1","]","Labbe",",","``","Kalman","and","Bayesian","Filters","in","Python","''","http",":","\/\/rlabbe.github.io\/Kalman-and-Bayesian-Filters-in-Python","[","2","]","Brookner",",","``","Tracking","and","Kalman","Filters","Made","Easy","''",".","John","Wiley","and","Sons",",","1998","."]
docstr: Returns the Variance Reduction Factor of the prediction
  step of the filter. The VRF is the
  normalized variance for the filter, as given in the equation below.
  
  .. math::
      VRF(\hat{x}_{n+1,n}) = \\frac{VAR(\hat{x}_{n+1,n})}{\sigma^2_x}
  
  References
  ----------
  
  Asquith, "Weight Selection in First Order Linear Filters"
  Report No RG-TR-69-12, U.S. Army Missle Command. Redstone Arsenal, Al.
  November 24, 1970.
docstr_tok: ["Returns","the","Variance","Reduction","Factor","of","the","prediction","step","of","the","filter",".","The","VRF","is","the","normalized","variance","for","the","filter",",","as","given","in","the","equation","below",".","..","math",":",":","VRF","(","\\hat","{","x","}","_","{","n+1",",","n","}",")","=","\\\\frac","{","VAR","(","\\hat","{","x","}","_","{","n+1",",","n","}",")","}","{","\\sigma^2_x","}","References","--","--","--","--","--","Asquith",",","``","Weight","Selection","in","First","Order","Linear","Filters","''","Report","No","RG-TR-69-12",",","U.S.","Army","Missle","Command",".","Redstone","Arsenal",",","Al",".","November","24",",","1970","."]
code: def VRF_prediction(self):
      r"""
      Returns the Variance Reduction Factor of the prediction
      step of the filter. The VRF is the
      normalized variance for the filter, as given in the equation below.
  
      .. math::
          VRF(\hat{x}_{n+1,n}) = \\frac{VAR(\hat{x}_{n+1,n})}{\sigma^2_x}
  
      References
      ----------
  
      Asquith, "Weight Selection in First Order Linear Filters"
      Report No RG-TR-69-12, U.S. Army Missle Command. Redstone Arsenal, Al.
      November 24, 1970.
      """
  
      g = self.g
      h = self.h
  
      return (2 * g**2 + 2 * h + g * h) / (g * (4 - 2 * g - h))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  from numpy import dot
  from filterpy.common import pretty_str
label_desc: Use image node_id 4 for calling the GHFilter obj's underlying member method code with example usage: obj.VRF_prediction() and returns: unknown