class_docstr: The main class of the dynamic linear model.
  
  
  This is the main class of the Bayeisan dynamic linear model.
  It provides the modeling, filtering, forecasting and smoothing
  function of a dlm.
  The dlm use the @builder to construct the @baseModel based on user supplied
  @components and then run @kalmanFilter to filter the result.
  
  Example 1:
      >>> # randomly generate fake data on 1000 days
      >>> import numpy as np
      >>> data = np.random.random((1, 1000))
      >>> # construct the dlm of a linear trend and a 7-day seasonality
      >>> myDlm = dlm(data) + trend(degree = 2, 0.98) + seasonality(period = 7, 0.98)
      >>> # filter the result
      >>> myDlm.fitForwardFilter()
      >>> # extract the filtered result
      >>> myDlm.getFilteredObs()
  
  Example 2 (fit a linear regression):
      >>> from pydlm import dynamic
      >>> data = np.random.random((1, 100))
      >>> mydlm = dlm(data) + trend(degree=1, 0.98, name='a') +
                      dynamic(features=[[i] for i in range(100)], 1, name='b')
      >>> mydlm.fit()
      >>> coef_a = mydlm.getLatentState('a')
      >>> coef_b = mydlm.getLatentState('b')
  
  Attributes:
     data: a list of doubles of the raw time series data.
           It could be either the python's built-in list of
           doubles or numpy 1d array.
docstr: Fit forward filter on the available data.
  
  User can choose use rolling windowFront
  or not. If user choose not to use the rolling window,
  then the filtering will be based on all the previous data.
  If rolling window is used, then the filtering for a particular
  date will only consider previous dates that are
  within the rolling window length.
  
  Args:
      useRollingWindow: indicate whether rolling window should be used.
      windowLength: the length of the rolling window if used.
docstr_tok: ["Fit","forward","filter","on","the","available","data",".","User","can","choose","use","rolling","windowFront","or","not",".","If","user","choose","not","to","use","the","rolling","window",",","then","the","filtering","will","be","based","on","all","the","previous","data",".","If","rolling","window","is","used",",","then","the","filtering","for","a","particular","date","will","only","consider","previous","dates","that","are","within","the","rolling","window","length",".","Args",":","useRollingWindow",":","indicate","whether","rolling","window","should","be","used",".","windowLength",":","the","length","of","the","rolling","window","if","used","."]
code: def fitForwardFilter(self, useRollingWindow=False, windowLength=3):
      """Fit forward filter on the available data.
  
      User can choose use rolling windowFront
      or not. If user choose not to use the rolling window,
      then the filtering will be based on all the previous data.
      If rolling window is used, then the filtering for a particular
      date will only consider previous dates that are
      within the rolling window length.
  
      Args:
          useRollingWindow: indicate whether rolling window should be used.
          windowLength: the length of the rolling window if used.
  
      """
      # check if the feature size matches the data size
      self._checkFeatureSize()
  
      # see if the model has been initialized
      if not self.initialized:
          self._initialize()
  
      self._logger.info("Starting forward filtering...")
      if not useRollingWindow:
          # we start from the last step of previous filtering
          if self.result.filteredType == "non-rolling":
              start = self.result.filteredSteps[1] + 1
          else:
              start = 0
              # because we refit the forward filter, we need to reset the
              # backward smoother as well.
              self.result.smoothedSteps = [0, -1]
  
          # determine whether renew should be used
          self._forwardFilter(
              start=start, end=self.n - 1, renew=self.options.stable
          )
          self.result.filteredType = "non-rolling"
      else:
          if self.result.filteredType == "rolling":
              windowFront = self.result.filteredSteps[1] + 1
          else:
              windowFront = 0
              # because we refit the forward filter, we need to reset the
              # backward smoother as well.
              self.result.smoothedSteps = [0, -1]
  
          self.result.filteredType = "rolling"
          # if end is still within (0, windowLength - 1), we should run the
          # usual ff from
          if windowFront < windowLength:
              self._forwardFilter(
                  start=self.result.filteredSteps[1] + 1,
                  end=min(windowLength - 1, self.n - 1),
              )
  
          # for the remaining date, we use a rolling window
          for today in range(max(windowFront, windowLength), self.n):
              self._forwardFilter(
                  start=today - windowLength + 1,
                  end=today,
                  save=today,
                  ForgetPrevious=True,
              )
  
      self.result.filteredSteps = [0, self.n - 1]
      self.turnOn("filtered plot")
      self.turnOn("predict plot")
  
      self._logger.info("Forward filtering completed.")
  
imports: from copy import deepcopy
  from numpy import matrix
  from pydlm.predict.dlmPredictMod import dlmPredictModule
  from pydlm.access.dlmAccessMod import dlmAccessModule
  from pydlm.tuner.dlmTuneMod import dlmTuneModule
  from pydlm.plot.dlmPlotMod import dlmPlotModule
label_desc: Use image node_id 8 for calling the dlm obj's underlying member method code with example usage: obj.fitForwardFilter(useRollingWindow, windowLength) without return types