class_docstr: A dlm module containing all prediction methods.
      
docstr: One day ahead predict based on the current data.
  
  The predict result is based on all the data before date and predict the
  observation at date + days. 
  
  The prediction could be on the last day and into the future or in 
  the middle of the time series and ignore the rest. For predicting into
  the future, the new features must be supplied to featureDict. For 
  prediction in the middle, the user can still supply the features which
  will be used priorily. The old features will be used if featureDict is
  None.
  
  Args:
      date: the index when the prediction based on. Default to the
            last day.
      featureDict: the feature set for the dynamic Components, in a form
            of {"component_name": feature}. If the featureDict is not
            supplied, then the algo reuse those stored in the dynamic
            components. For dates beyond the last day, featureDict must
            be supplied.
  
  Returns:
      A tuple. (Predicted observation, variance of the predicted
      observation)
docstr_tok: ["One","day","ahead","predict","based","on","the","current","data",".","The","predict","result","is","based","on","all","the","data","before","date","and","predict","the","observation","at","date","+","days",".","The","prediction","could","be","on","the","last","day","and","into","the","future","or","in","the","middle","of","the","time","series","and","ignore","the","rest",".","For","predicting","into","the","future",",","the","new","features","must","be","supplied","to","featureDict",".","For","prediction","in","the","middle",",","the","user","can","still","supply","the","features","which","will","be","used","priorily",".","The","old","features","will","be","used","if","featureDict","is","None",".","Args",":","date",":","the","index","when","the","prediction","based","on",".","Default","to","the","last","day",".","featureDict",":","the","feature","set","for","the","dynamic","Components",",","in","a","form","of","{","``","component_name","''",":","feature","}",".","If","the","featureDict","is","not","supplied",",","then","the","algo","reuse","those","stored","in","the","dynamic","components",".","For","dates","beyond","the","last","day",",","featureDict","must","be","supplied",".","Returns",":","A","tuple",".","(","Predicted","observation",",","variance","of","the","predicted","observation",")"]
code: def predict(self, date=None, featureDict=None):
      """One day ahead predict based on the current data.
  
      The predict result is based on all the data before date and predict the
      observation at date + days.
  
      The prediction could be on the last day and into the future or in
      the middle of the time series and ignore the rest. For predicting into
      the future, the new features must be supplied to featureDict. For
      prediction in the middle, the user can still supply the features which
      will be used priorily. The old features will be used if featureDict is
      None.
  
      Args:
          date: the index when the prediction based on. Default to the
                last day.
          featureDict: the feature set for the dynamic Components, in a form
                of {"component_name": feature}. If the featureDict is not
                supplied, then the algo reuse those stored in the dynamic
                components. For dates beyond the last day, featureDict must
                be supplied.
  
      Returns:
          A tuple. (Predicted observation, variance of the predicted
          observation)
  
      """
      # the default prediction date
      if date is None:
          date = self.n - 1
  
      # check if the data on the date has been filtered
      if date > self.result.filteredSteps[1]:
          raise NameError(
              "Prediction can only be made right"
              + " after the filtered date"
          )
  
      # Clear the existing predictModel before the deepcopy to avoid recurrent
      # recurrent copy which could explode the memory and complexity.
      self._predictModel = None
      self._predictModel = deepcopy(self)
      return self._predictModel._oneDayAheadPredict(
          date=date, featureDict=featureDict
      )
  
imports: from copy import deepcopy
  from numpy import matrix
  from pydlm.predict._dlmPredict import _dlmPredict
label_desc: Use image node_id 1 for calling the dlmPredictModule obj's underlying member method code with example usage: obj.predict(date, featureDict) and returns: self