class_docstr: Kalman Filter is used for denoising data, or inferring the hidden state of data.
  
  Note - this class is a base class and should not be used directly.
  
  The Kalman filter is an unsupervised algorithm consisting of
  several mathematical equations which are used to create
  an estimate of the state of a process.
  The algorithm does this efficiently and recursively in a
  way where the mean squared error is minimal.
  The Kalman Filter has the ability to support estimations
  of past, present and future states.
  The strength of the Kalman Filter is in its ability to
  infer the state of a system even when the exact nature of the
  system is not known.
  When given time series data, the Kalman filter creates a denoising effect
  by removing noise from the data, and recovering the true
  state of the underlying object we are tracking within the
  data.
  The Kalman Filter computations are based on five equations.
  
  Two prediction equations:
  
  -  State Extrapolation Equation - prediction or estimation of the future state,
      based on the known present estimation.
  -  Covariance Extrapolation Equation - the measure of uncertainty in our prediction.
  
  Two update equations:
  
  -  State Update Equation - estimation of the current state,
      based on the known past estimation and present measurement.
  -  Covariance Update Equation - the measure of uncertainty in our estimation.
  
  Kalman Gain Equation - this is a required argument for the update equations.
  It acts as a weighting parameter for the past estimations and the given measurement.
  It defines the weight of the past estimation and
  the weight of the measurement in estimating the current state.
  
  Parameters
  ----------
  state_dim : int
      System state feature dimension
  state_transition : np.ndarray, optional (default=None)
      of shape (state_dim, state_dim) or (time_steps, state_dim, state_dim).
      State transition matrix, also referred to as F, is a matrix
      which describes the way the underlying series moves
      through successive time periods.
  process_noise : np.ndarray, optional (default=None)
      of shape (state_dim, state_dim) or (time_steps, state_dim, state_dim).
      Process noise matrix, also referred to as Q,
      the uncertainty of the dynamic model.
  measurement_noise : np.ndarray, optional (default=None)
      of shape (measurement_dim, measurement_dim) or
      (time_steps, measurement_dim, measurement_dim).
      Measurement noise matrix, also referred to as R,
      represents the uncertainty of the measurements.
  measurement_function : np.ndarray, optional (default=None)
      of shape (measurement_dim, state_dim) or
      (time_steps, measurement_dim, state_dim).
      Measurement equation matrix, also referred to as H, adjusts
      dimensions of measurements to match dimensions of state.
  initial_state : np.ndarray, optional (default=None)
      of shape (state_dim,).
      Initial estimated system state, also referred to as x0.
  initial_state_covariance : np.ndarray, optional (default=None)
      of shape (state_dim, state_dim).
      Initial estimated system state covariance, also referred to as P0.
  
  References
  ----------
  .. [1] Greg Welch and Gary Bishop, "An Introduction to the Kalman Filter", 2006
         https://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf
  .. [2] R.H.Shumway and D.S.Stoffer "An Approach to time
         Series Smoothing and Forecasting Using the EM Algorithm", 1982
         https://www.stat.pitt.edu/stoffer/dss_files/em.pdf
class_docstr_tok: ["Kalman","Filter","is","used","for","denoising","data",",","or","inferring","the","hidden","state","of","data",".","Note","-","this","class","is","a","base","class","and","should","not","be","used","directly",".","The","Kalman","filter","is","an","unsupervised","algorithm","consisting","of","several","mathematical","equations","which","are","used","to","create","an","estimate","of","the","state","of","a","process",".","The","algorithm","does","this","efficiently","and","recursively","in","a","way","where","the","mean","squared","error","is","minimal",".","The","Kalman","Filter","has","the","ability","to","support","estimations","of","past",",","present","and","future","states",".","The","strength","of","the","Kalman","Filter","is","in","its","ability","to","infer","the","state","of","a","system","even","when","the","exact","nature","of","the","system","is","not","known",".","When","given","time","series","data",",","the","Kalman","filter","creates","a","denoising","effect","by","removing","noise","from","the","data",",","and","recovering","the","true","state","of","the","underlying","object","we","are","tracking","within","the","data",".","The","Kalman","Filter","computations","are","based","on","five","equations",".","Two","prediction","equations",":","-","State","Extrapolation","Equation","-","prediction","or","estimation","of","the","future","state",",","based","on","the","known","present","estimation",".","-","Covariance","Extrapolation","Equation","-","the","measure","of","uncertainty","in","our","prediction",".","Two","update","equations",":","-","State","Update","Equation","-","estimation","of","the","current","state",",","based","on","the","known","past","estimation","and","present","measurement",".","-","Covariance","Update","Equation","-","the","measure","of","uncertainty","in","our","estimation",".","Kalman","Gain","Equation","-","this","is","a","required","argument","for","the","update","equations",".","It","acts","as","a","weighting","parameter","for","the","past","estimations","and","the","given","measurement",".","It","defines","the","weight","of","the","past","estimation","and","the","weight","of","the","measurement","in","estimating","the","current","state",".","Parameters","--","--","--","--","--","state_dim",":","int","System","state","feature","dimension","state_transition",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","state_dim",",","state_dim",")","or","(","time_steps",",","state_dim",",","state_dim",")",".","State","transition","matrix",",","also","referred","to","as","F",",","is","a","matrix","which","describes","the","way","the","underlying","series","moves","through","successive","time","periods",".","process_noise",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","state_dim",",","state_dim",")","or","(","time_steps",",","state_dim",",","state_dim",")",".","Process","noise","matrix",",","also","referred","to","as","Q",",","the","uncertainty","of","the","dynamic","model",".","measurement_noise",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","measurement_dim",",","measurement_dim",")","or","(","time_steps",",","measurement_dim",",","measurement_dim",")",".","Measurement","noise","matrix",",","also","referred","to","as","R",",","represents","the","uncertainty","of","the","measurements",".","measurement_function",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","measurement_dim",",","state_dim",")","or","(","time_steps",",","measurement_dim",",","state_dim",")",".","Measurement","equation","matrix",",","also","referred","to","as","H",",","adjusts","dimensions","of","measurements","to","match","dimensions","of","state",".","initial_state",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","state_dim",",",")",".","Initial","estimated","system","state",",","also","referred","to","as","x0",".","initial_state_covariance",":","np.ndarray",",","optional","(","default=None",")","of","shape","(","state_dim",",","state_dim",")",".","Initial","estimated","system","state","covariance",",","also","referred","to","as","P0",".","References","--","--","--","--","--","..","[","1","]","Greg","Welch","and","Gary","Bishop",",","``","An","Introduction","to","the","Kalman","Filter","''",",","2006","https",":","\/\/www.cs.unc.edu\/~welch\/media\/pdf\/kalman_intro.pdf","..","[","2","]","R.H.Shumway","and","D.S.Stoffer","``","An","Approach","to","time","Series","Smoothing","and","Forecasting","Using","the","EM","Algorithm","''",",","1982","https",":","\/\/www.stat.pitt.edu\/stoffer\/dss_files\/em.pdf"]
code: def __init__(
      self,
      state_dim,
      state_transition=None,
      process_noise=None,
      measurement_noise=None,
      measurement_function=None,
      initial_state=None,
      initial_state_covariance=None,
  ):
      self.state_dim = state_dim
      # F/A
      self.state_transition = state_transition
      # Q
      self.process_noise = process_noise
      # R
      self.measurement_noise = measurement_noise
      # H/C
      self.measurement_function = measurement_function
      # X0
      self.initial_state = initial_state
      # P0
      self.initial_state_covariance = initial_state_covariance
  
      super().__init__()
  
imports: import numpy
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.warnings import warn
label_desc: Use image node_id 1 to create a new BaseKalmanFilter object  with example: obj = BaseKalmanFilter(state_dim, state_transition, process_noise, measurement_noise, measurement_function, initial_state, initial_state_covariance)