class_docstr: A dlm module for all the access methods
      
class_docstr_tok: ["A","dlm","module","for","all","the","access","methods"]
docstr: get the latent states for different components and filters.
  
  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 latent states to be returned. Could be
                  'forwardFilter', 'backwardSmoother', and 'predict'.
                  Default to 'forwardFilter'.
      name: the component to get latent state. When name = 'all', then it
            returns the latent states for the time series. When
            name = some component's name, then it returns the latent
            states for that component. Default to 'all'.
  
  Returns:
      A list of lists, standing for the latent states given
      the different choices.
docstr_tok: ["get","the","latent","states","for","different","components","and","filters",".","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","latent","states","to","be","returned",".","Could","be","'forwardFilter","'",",","'backwardSmoother","'",",","and","'predict","'",".","Default","to","'forwardFilter","'",".","name",":","the","component","to","get","latent","state",".","When","name","=","'all","'",",","then","it","returns","the","latent","states","for","the","time","series",".","When","name","=","some","component","'s","name",",","then","it","returns","the","latent","states","for","that","component",".","Default","to","'all","'",".","Returns",":","A","list","of","lists",",","standing","for","the","latent","states","given","the","different","choices","."]
code: def getLatentState(self, filterType="forwardFilter", name="all"):
      """get the latent states for different components and filters.
  
      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 latent states to be returned. Could be
                      'forwardFilter', 'backwardSmoother', and 'predict'.
                      Default to 'forwardFilter'.
          name: the component to get latent state. When name = 'all', then it
                returns the latent states for the time series. When
                name = some component's name, then it returns the latent
                states for that component. Default to 'all'.
  
      Returns:
          A list of lists, standing for the latent states given
          the different choices.
  
      """
      # get the working dates
      start, end = self._checkAndGetWorkingDates(filterType=filterType)
      end += 1
      # to return the full latent states
      if name == "all":
          if filterType == "forwardFilter":
              return list(
                  map(
                      lambda x: x
                      if x is None
                      else self._1DmatrixToArray(x),
                      self.result.filteredState[start:end],
                  )
              )
          elif filterType == "backwardSmoother":
              return list(
                  map(
                      lambda x: x
                      if x is None
                      else self._1DmatrixToArray(x),
                      self.result.smoothedState[start:end],
                  )
              )
          elif filterType == "predict":
              return list(
                  map(
                      lambda x: x
                      if x is None
                      else self._1DmatrixToArray(x),
                      self.result.smoothedState[start:end],
                  )
              )
          else:
              raise NameError("Incorrect filter type.")
  
      # to return the latent state for a given component
      self._checkComponent(name)
      return list(
          map(
              lambda x: x if x is None else self._1DmatrixToArray(x),
              self._getLatentState(
                  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 6 for calling the dlmAccessModule obj's underlying member method code with example usage: obj.getLatentState(filterType, name) and returns: list, list, list, list