class_docstr: A dlm module for all the access methods
      
class_docstr_tok: ["A","dlm","module","for","all","the","access","methods"]
docstr: get the variance 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:
      filterType: the type of variance to be returned. Could be
                  'forwardFilter', 'backwardSmoother', and 'predict'.
                  Default to 'forwardFilter'.
      name: the component to get variance. When name = 'main', then it
            returns the filtered variance for the time series. When
            name = some component's name, then it returns the filtered
            variance for that component. Default to 'main'.
  
  Returns:
      A list of the filtered variances based on the choice.
docstr_tok: ["get","the","variance","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",":","filterType",":","the","type","of","variance","to","be","returned",".","Could","be","'forwardFilter","'",",","'backwardSmoother","'",",","and","'predict","'",".","Default","to","'forwardFilter","'",".","name",":","the","component","to","get","variance",".","When","name","=","'main","'",",","then","it","returns","the","filtered","variance","for","the","time","series",".","When","name","=","some","component","'s","name",",","then","it","returns","the","filtered","variance","for","that","component",".","Default","to","'main","'",".","Returns",":","A","list","of","the","filtered","variances","based","on","the","choice","."]
code: def getVar(self, filterType="forwardFilter", name="main"):
      """get the variance 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:
          filterType: the type of variance to be returned. Could be
                      'forwardFilter', 'backwardSmoother', and 'predict'.
                      Default to 'forwardFilter'.
          name: the component to get variance. When name = 'main', then it
                returns the filtered variance for the time series. When
                name = some component's name, then it returns the filtered
                variance for that component. Default to 'main'.
  
      Returns:
          A list of the filtered variances based on the choice.
  
      """
      # get the working date
      start, end = self._checkAndGetWorkingDates(filterType=filterType)
      end += 1
      # get the variance for the time series data
      if name == "main":
          # get out of the matrix form
          if filterType == "forwardFilter":
              return self._1DmatrixToArray(
                  self.result.filteredObsVar[start:end]
              )
          elif filterType == "backwardSmoother":
              return self._1DmatrixToArray(
                  self.result.smoothedObsVar[start:end]
              )
          elif filterType == "predict":
              return self._1DmatrixToArray(
                  self.result.predictedObsVar[start:end]
              )
          else:
              raise NameError("Incorrect filter type.")
  
      # get the variance for the component
      self._checkComponent(name)
      return self._getComponentVar(
          name=name, filterType=filterType, start=start, end=(end - 1)
      )
  
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 3 for calling the dlmAccessModule obj's underlying member method code with example usage: obj.getVar(filterType, name) and returns: self, self, self, self