class_docstr: Update only periodically when update is called.
  
  If update is called, behaves like update_params=False, unless update_interval has
      elapsed since the last "true" update = inner update with update_params=False.
      update_window controls the lookback window on which refitting is done
          refit data is cutoff (inclusive) to cutoff minus refit_window (exclusive)
  
  Caution: default value of update_interval means *no updates* after `fit`.
  
  Parameters
  ----------
  update_interval : difference of sktime time indices (int or timedelta), optional
      interval that needs to elapse until inner update call with update_params=True
      default = None = infinity, i.e., never updates
      if index of y seen in fit is integer or y is index-free container type,
          update_interval must be int, is interpreted as difference of int location
      if index of y seen in fit is timestamp, must be int or pd.Timedelta
          if pd.Timedelta, will be interpreted as time since last true update elapsed
          if int, will be interpreted as number of time stamps seen since last update
class_docstr_tok: ["Update","only","periodically","when","update","is","called",".","If","update","is","called",",","behaves","like","update_params=False",",","unless","update_interval","has","elapsed","since","the","last","``","true","''","update","=","inner","update","with","update_params=False",".","update_window","controls","the","lookback","window","on","which","refitting","is","done","refit","data","is","cutoff","(","inclusive",")","to","cutoff","minus","refit_window","(","exclusive",")","Caution",":","default","value","of","update_interval","means","*","no","updates","*","after","`","fit","`",".","Parameters","--","--","--","--","--","update_interval",":","difference","of","sktime","time","indices","(","int","or","timedelta",")",",","optional","interval","that","needs","to","elapse","until","inner","update","call","with","update_params=True","default","=","None","=","infinity",",","i.e.",",","never","updates","if","index","of","y","seen","in","fit","is","integer","or","y","is","index-free","container","type",",","update_interval","must","be","int",",","is","interpreted","as","difference","of","int","location","if","index","of","y","seen","in","fit","is","timestamp",",","must","be","int","or","pd.Timedelta","if","pd.Timedelta",",","will","be","interpreted","as","time","since","last","true","update","elapsed","if","int",",","will","be","interpreted","as","number","of","time","stamps","seen","since","last","update"]
docstr: Update time series to incremental training data.
  
  private _update containing the core logic, called from update
  
  State required:
      Requires state to be "fitted".
  
  Accesses in self:
      Fitted model attributes ending in "_"
      self.cutoff
  
  Writes to self:
      Sets fitted model attributes ending in "_", if update_params=True.
      Does not write to self if update_params=False.
  
  Parameters
  ----------
  y : guaranteed to be of a type in self.get_tag("y_inner_mtype")
      Time series with which to update the forecaster.
      if self.get_tag("scitype:y")=="univariate":
          guaranteed to have a single column/variable
      if self.get_tag("scitype:y")=="multivariate":
          guaranteed to have 2 or more columns
      if self.get_tag("scitype:y")=="both": no restrictions apply
  X : pd.DataFrame, optional (default=None)
      Exogenous time series
  update_params : bool, optional (default=True)
      whether model parameters should be updated
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Update","time","series","to","incremental","training","data",".","private","_update","containing","the","core","logic",",","called","from","update","State","required",":","Requires","state","to","be","``","fitted","''",".","Accesses","in","self",":","Fitted","model","attributes","ending","in","``","_","''","self.cutoff","Writes","to","self",":","Sets","fitted","model","attributes","ending","in","``","_","''",",","if","update_params=True",".","Does","not","write","to","self","if","update_params=False",".","Parameters","--","--","--","--","--","y",":","guaranteed","to","be","of","a","type","in","self.get_tag","(","``","y_inner_mtype","''",")","Time","series","with","which","to","update","the","forecaster",".","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","univariate","''",":","guaranteed","to","have","a","single","column\/variable","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","multivariate","''",":","guaranteed","to","have","2","or","more","columns","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","both","''",":","no","restrictions","apply","X",":","pd.DataFrame",",","optional","(","default=None",")","Exogenous","time","series","update_params",":","bool",",","optional","(","default=True",")","whether","model","parameters","should","be","updated","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _update(self, y, X=None, update_params=True):
      """Update time series to incremental training data.
  
      private _update containing the core logic, called from update
  
      State required:
          Requires state to be "fitted".
  
      Accesses in self:
          Fitted model attributes ending in "_"
          self.cutoff
  
      Writes to self:
          Sets fitted model attributes ending in "_", if update_params=True.
          Does not write to self if update_params=False.
  
      Parameters
      ----------
      y : guaranteed to be of a type in self.get_tag("y_inner_mtype")
          Time series with which to update the forecaster.
          if self.get_tag("scitype:y")=="univariate":
              guaranteed to have a single column/variable
          if self.get_tag("scitype:y")=="multivariate":
              guaranteed to have 2 or more columns
          if self.get_tag("scitype:y")=="both": no restrictions apply
      X : pd.DataFrame, optional (default=None)
          Exogenous time series
      update_params : bool, optional (default=True)
          whether model parameters should be updated
  
      Returns
      -------
      self : reference to self
      """
      estimator = self._get_delegate()
      time_since_last_update = self.cutoff[0] - self.last_update_cutoff_
      update_interval = self.update_interval
  
      _y = self._y
  
      # treat situation where indexing of y is in timedelta but differences are int
      #   in that case, interpret any integers as iloc index differences
      #   and replace integers with timedelta quantities before proceeding
      if isinstance(time_since_last_update, pd.Timedelta):
          if isinstance(update_interval, int):
              index = min(update_interval, len(_y))
              update_interval = self.cutoff[0] - _y.index[-index]
      # case distinction based on whether the update_interval period has elapsed
      # (None update_interval means infinite update_interval)
      #   if yes: call inner update with update_params=True, aka "true" update
      if (
          update_interval is not None
          and time_since_last_update >= update_interval
      ):
          estimator.update(y=y, X=X, update_params=update_params)
  
          # remember that we just updated the estimator
          self.last_update_cutoff_ = self.cutoff[0]
      else:
          # if no: call update, but with update_params=False
          estimator.update(y=y, X=X, update_params=False)
      return self
  
imports: import pandas
  from sktime.datatypes import ALL_TIME_SERIES_MTYPES
  from sktime.datatypes._utilities import get_window
  from sktime.forecasting.base._delegate import _DelegatedForecaster
label_desc: Use image node_id 3 for calling the UpdateEvery obj's underlying member method code with example usage: obj._update(y, X, update_params) and returns: self