class_docstr: The longSeason class alows user to add a long seasonality component
  to the dlm. The difference between the long seasonality is that
  1) The seasonality component use each date as a unit and change in a given
  periodicity. For example, 1, 2, 3, 4, 1, 2, 3, 4.
  2) However, the long seasonality is capable to group couple of days as the
  basic unit and change in a periodicity. For example, 1, 1, 1, 2, 2, 2,
  3, 3, 3, 4, 4, 4.
  The usecase for long seasonality is to model longer seasonality with the
  short-term seasonality. For example, the short-term seansonality can be
  used to model the day of a weak patten and the long seasonality can be used
  to model the week of a month patten in the same model.
  This code implements the longSeason component as a sub-class of
  dynamic. Different from the dynamic component, the features in the
  autoReg is generated from the data, and updated according to the data.
  All other features are similar to @dynamic.
  
  Args:
      data: the time series data
      period: the periodicy of the longSeason component
      stay: the length of each state lasts
      discount: the discount factor
      name: the name of the trend component
      w: the value to set the prior covariance. Default to a diagonal
         matrix with 1e7 on the diagonal.
  
  Attributes:
      period: the periodicity, i.e., how many different states it has in
              one period
      stay: the length of a state last.
      discount factor: the discounting factor
      name: the name of the component
class_docstr_tok: ["The","longSeason","class","alows","user","to","add","a","long","seasonality","component","to","the","dlm",".","The","difference","between","the","long","seasonality","is","that","1",")","The","seasonality","component","use","each","date","as","a","unit","and","change","in","a","given","periodicity",".","For","example",",","1",",","2",",","3",",","4",",","1",",","2",",","3",",","4",".","2",")","However",",","the","long","seasonality","is","capable","to","group","couple","of","days","as","the","basic","unit","and","change","in","a","periodicity",".","For","example",",","1",",","1",",","1",",","2",",","2",",","2",",","3",",","3",",","3",",","4",",","4",",","4",".","The","usecase","for","long","seasonality","is","to","model","longer","seasonality","with","the","short-term","seasonality",".","For","example",",","the","short-term","seansonality","can","be","used","to","model","the","day","of","a","weak","patten","and","the","long","seasonality","can","be","used","to","model","the","week","of","a","month","patten","in","the","same","model",".","This","code","implements","the","longSeason","component","as","a","sub-class","of","dynamic",".","Different","from","the","dynamic","component",",","the","features","in","the","autoReg","is","generated","from","the","data",",","and","updated","according","to","the","data",".","All","other","features","are","similar","to","@","dynamic",".","Args",":","data",":","the","time","series","data","period",":","the","periodicy","of","the","longSeason","component","stay",":","the","length","of","each","state","lasts","discount",":","the","discount","factor","name",":","the","name","of","the","trend","component","w",":","the","value","to","set","the","prior","covariance",".","Default","to","a","diagonal","matrix","with","1e7","on","the","diagonal",".","Attributes",":","period",":","the","periodicity",",","i.e.",",","how","many","different","states","it","has","in","one","period","stay",":","the","length","of","a","state","last",".","discount","factor",":","the","discounting","factor","name",":","the","name","of","the","component"]
docstr: Pop out the data of a specific date and rewrite the correct feature matrix.
  
  Args:
      date: the index of which to be deleted.
docstr_tok: ["Pop","out","the","data","of","a","specific","date","and","rewrite","the","correct","feature","matrix",".","Args",":","date",":","the","index","of","which","to","be","deleted","."]
code: def popout(self, date):
      """Pop out the data of a specific date and rewrite the correct feature matrix.
  
      Args:
          date: the index of which to be deleted.
  
      """
      # Since the seasonality is a fixed patten,
      # no matter what date is popped out
      # we just need to remove the last date,
      # otherwise the feature patten will be
      # changed.
  
      # if you want to delete a date and change
      # the underlying patten, i.e., shorten
      # the periodicity of the period that date
      # is presented, you should use ignore
      # instead
      logging.warning(
          "Popout the date will change the whole"
          + " seasonality patten on all the"
          + "future days. If you want to keep the"
          + " seasonality patten on the future"
          + "days unchanged. Please use ignore instead"
      )
  
      self.features.pop()
      self.n -= 1
  
      # push currentState back by 1 day. Need to take care of all
      # corner cases.
      if self.nextState[1] == 0:
          self.nextState[1] = self.stay - 1
          if self.nextState[0] == 0:
              self.nextState[0] = self.period - 1
          else:
              self.nextState[0] -= 1
      else:
          self.nextState[1] -= 1
  
file_path: pydlm/pydlm/modeler/longSeason.py
imports: from .dynamic import dynamic
  from numpy import matrix
  import logging
label_desc: Use image node_id 5 for calling the longSeason obj's underlying member method code with example usage: obj.popout(date) without return types