class_docstr: A dlm module for all the access methods
      
class_docstr_tok: ["A","dlm","module","for","all","the","access","methods"]
docstr: get the confidence interval for data or component.
  
  If the filtered dates are not
  (0, self.n - 1), then a warning will prompt stating the actual
  filtered dates.
  
  Args:
      p: The confidence level.
      filterType: the type of CI to be returned. Could be
                  'forwardFilter', 'backwardSmoother', and 'predict'.
                  Default to 'forwardFilter'.
      name: the component to get CI. When name = 'main', then it
            returns the confidence interval for the time series. When
            name = some component's name, then it returns the confidence
            interval for that component. Default to 'main'.
  
  Returns:
      A tuple with the first element being a list of upper bounds
      and the second being a list of the lower bounds.
docstr_tok: ["get","the","confidence","interval","for","data","or","component",".","If","the","filtered","dates","are","not","(","0",",","self.n","-","1",")",",","then","a","warning","will","prompt","stating","the","actual","filtered","dates",".","Args",":","p",":","The","confidence","level",".","filterType",":","the","type","of","CI","to","be","returned",".","Could","be","'forwardFilter","'",",","'backwardSmoother","'",",","and","'predict","'",".","Default","to","'forwardFilter","'",".","name",":","the","component","to","get","CI",".","When","name","=","'main","'",",","then","it","returns","the","confidence","interval","for","the","time","series",".","When","name","=","some","component","'s","name",",","then","it","returns","the","confidence","interval","for","that","component",".","Default","to","'main","'",".","Returns",":","A","tuple","with","the","first","element","being","a","list","of","upper","bounds","and","the","second","being","a","list","of","the","lower","bounds","."]
code: def getInterval(
      self, p=0.95, filterType="forwardFilter", name="main"
  ):
      """get the confidence interval for data or component.
  
      If the filtered dates are not
      (0, self.n - 1), then a warning will prompt stating the actual
      filtered dates.
  
      Args:
          p: The confidence level.
          filterType: the type of CI to be returned. Could be
                      'forwardFilter', 'backwardSmoother', and 'predict'.
                      Default to 'forwardFilter'.
          name: the component to get CI. When name = 'main', then it
                returns the confidence interval for the time series. When
                name = some component's name, then it returns the confidence
                interval for that component. Default to 'main'.
  
      Returns:
          A tuple with the first element being a list of upper bounds
          and the second being a list of the lower bounds.
  
      """
      # get the working date
      start, end = self._checkAndGetWorkingDates(filterType=filterType)
      end += 1
      # get the mean and the variance for the time series data
      if name == "main":
          # get out of the matrix form
          if filterType == "forwardFilter":
              compMean = self._1DmatrixToArray(
                  self.result.filteredObs[start:end]
              )
              compVar = self._1DmatrixToArray(
                  self.result.filteredObsVar[start:end]
              )
          elif filterType == "backwardSmoother":
              compMean = self._1DmatrixToArray(
                  self.result.smoothedObs[start:end]
              )
              compVar = self._1DmatrixToArray(
                  self.result.smoothedObsVar[start:end]
              )
          elif filterType == "predict":
              compMean = self._1DmatrixToArray(
                  self.result.predictedObs[start:end]
              )
              compVar = self._1DmatrixToArray(
                  self.result.predictedObsVar[start:end]
              )
          else:
              raise NameError("Incorrect filter type.")
  
      # get the mean and variance for the component
      else:
          self._checkComponent(name)
          compMean = self._getComponentMean(
              name=name,
              filterType=filterType,
              start=start,
              end=(end - 1),
          )
          compVar = self._getComponentVar(
              name=name,
              filterType=filterType,
              start=start,
              end=(end - 1),
          )
  
      # get the upper and lower bound
      upper, lower = getInterval(compMean, compVar, p)
      return (upper, lower)
  
file_path: pydlm/pydlm/access/dlmAccessMod.py
imports: from copy import deepcopy
  from pydlm.base.tools import getInterval
  from pydlm.access._dlmGet import _dlmGet
label_desc: Use image node_id 5 for calling the dlmAccessModule obj's underlying member method code with example usage: obj.getInterval(p, filterType, name) and returns: upper,  lower