class_docstr: _dlm includes all basic functions for building dlm model.
  
  Attributes:
      data: the observed time series data
      n: the length of the time series data
      result: the inner class that records the filtered and smoothed results
      builder: the @builder that is used for providing the modeling
      functionality. For details please refer to @builder
      Filter: the filter used for filtering time series data using the model.
              For details please refer to @kalmanFilter
      initialized: indicates whether the dynamic linear model has been
                   initialized
      options: model options, including initial guess of the observational
               variance.
               More is going to be added (plot options and shrinkage options)
      time: the time label, used for plotting
  
  
  Methods:
      _initialize: initialize the dlm (builder and kalmanFilter)
      _forwardFilter: run forward filter for a specific start and end date
      _backwardSmoother: run backward smooth for a specific start and end
                         date
      _predictInSample: predict the latent state and observation for a given
                        period of time (deprecated)
      _resetModelStatus: reset the model status to its prior status
      _setModelStatus: set the model status to a specific date
      _defaultOptions: a class to store and set default options
      _result: a class to store the results
      _copy: copy the result from the model to the _result class
      _reverseCopy: copy the result from the _result class to the model
      _checkFeatureSize: check whether the features's n matches the data's n
      _checkComponent: check whether a component is in dlm
      _checkPlotOptions: set the correct options according to the fit
      _checkAndGetWorkingDates: get the correct filtering dates
docstr: Running forwardFilter for the data for a given start and end date
  
  Args:
      start: the start date
      end: the end date (default to the last day of the chain)
      save: indicate the dates of which the result needs to be saved for.
            'all' stands for (start, end), otherwise an integer between
            start and end.
      ForgetPrevious: indicate whether the fitering should start from
                      the prior status or the previous date that has
                      been filtered.
                      (used for rolling window filtering, see @dlm)
      renew: if true, filter will refit certain days when the
             chain gets
             too long to add numerical stability, the length of the chain
             is determined by the information carried on. For example,
             when discount = 0.9, any days that are 65 days ago together
             only carry information 1%, so we ignore
             these days and refit the model to aid stability.
docstr_tok: ["Running","forwardFilter","for","the","data","for","a","given","start","and","end","date","Args",":","start",":","the","start","date","end",":","the","end","date","(","default","to","the","last","day","of","the","chain",")","save",":","indicate","the","dates","of","which","the","result","needs","to","be","saved","for",".","'all","'","stands","for","(","start",",","end",")",",","otherwise","an","integer","between","start","and","end",".","ForgetPrevious",":","indicate","whether","the","fitering","should","start","from","the","prior","status","or","the","previous","date","that","has","been","filtered",".","(","used","for","rolling","window","filtering",",","see","@","dlm",")","renew",":","if","true",",","filter","will","refit","certain","days","when","the","chain","gets","too","long","to","add","numerical","stability",",","the","length","of","the","chain","is","determined","by","the","information","carried","on",".","For","example",",","when","discount","=","0.9",",","any","days","that","are","65","days","ago","together","only","carry","information","1","%",",","so","we","ignore","these","days","and","refit","the","model","to","aid","stability","."]
code: def _forwardFilter(
      self,
      start=0,
      end=None,
      save="all",
      ForgetPrevious=False,
      renew=False,
  ):
      """Running forwardFilter for the data for a given start and end date
  
      Args:
          start: the start date
          end: the end date (default to the last day of the chain)
          save: indicate the dates of which the result needs to be saved for.
                'all' stands for (start, end), otherwise an integer between
                start and end.
          ForgetPrevious: indicate whether the fitering should start from
                          the prior status or the previous date that has
                          been filtered.
                          (used for rolling window filtering, see @dlm)
          renew: if true, filter will refit certain days when the
                 chain gets
                 too long to add numerical stability, the length of the chain
                 is determined by the information carried on. For example,
                 when discount = 0.9, any days that are 65 days ago together
                 only carry information 1%, so we ignore
                 these days and refit the model to aid stability.
      """
      # the default value for end
      if end is None:
          end = self.n - 1
  
      # to see if the ff need to run or not
      if start > end:
          return None
  
      # first we need to initialize the model to the correct status
      # if the start point is 0 or we want to forget the previous result
      if start == 0 or ForgetPrevious:
          self._resetModelStatus()
  
      # otherwise we use the result on the previous day as the prior
      else:
          if start > self.result.filteredSteps[1] + 1:
              raise ValueError(
                  "The data before start date has"
                  " yet to be filtered! Otherwise set"
                  " ForgetPrevious to be True. Check the"
                  " <filteredSteps> in <result> object."
              )
          self._setModelStatus(date=start - 1)
  
      # we run the forward filter sequentially
      lastRenewPoint = start  # record the last renew point
      for step in range(start, end + 1):
          # first check whether we need to update evaluation or not
          if (
              len(self.builder.dynamicComponents) > 0
              or len(self.builder.automaticComponents) > 0
          ):
              self.builder.updateEvaluation(step, self.padded_data)
  
          # check if rewnew is needed
          if (
              renew
              and step - lastRenewPoint > self.builder.renewTerm
              and self.builder.renewTerm > 0.0
          ):
              # we renew the state of the day
              self._resetModelStatus()
              for innerStep in range(
                  step - int(self.builder.renewTerm), step
              ):
                  self.Filter.forwardFilter(
                      self.builder.model, self.data[innerStep]
                  )
              lastRenewPoint = step
  
          # then we use the updated model to filter the state
          self.Filter.forwardFilter(self.builder.model, self.data[step])
  
          # extract the result and record
          if save == "all" or save == step:
              self._copy(
                  model=self.builder.model,
                  result=self.result,
                  step=step,
                  filterType="forwardFilter",
              )
  
imports: from pydlm.base.kalmanFilter import kalmanFilter
  from pydlm.modeler.builder import builder
  from numpy import var
  import logging
label_desc: Use image node_id 5 for calling the _dlm obj's underlying member method code with example usage: obj._forwardFilter(start, end, save, ForgetPrevious, renew) and returns: None