class_docstr: Refits periodically when update is called.
  
  If update is called with update_params=True and refit_interval or more has
      elapsed since the last fit, refits the forecaster instead (call to fit).
          refitting is done on (potentially) all data seen so far.
      refit_window controls the lookback window on which refitting is done
          refit data is cutoff (inclusive) to cutoff minus refit_window (exclusive)
  
  Parameters
  ----------
  refit_interval : difference of sktime time indices (int or timedelta), optional
      interval that needs to elapse after which the first update defaults to fit
      default = 0, i.e., always refits, never updates
      if index of y seen in fit is integer or y is index-free container type,
          refit_interval must be int, and 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 refit elapsed
          if int, will be interpreted as number of time stamps seen since last refit
  refit_window_size : difference of sktime time indices (int or timedelta), optional
      length of the data window to refit to in case update calls fit
      default = inf, i.e., refits to entire training data seen so far
  refit_window_lag : difference of sktime indices (int or timedelta), optional
      lag of the data window to refit to, w.r.t. cutoff, in case update calls fit
      default = 0, i.e., refit window ends with and includes cutoff
class_docstr_tok: ["Refits","periodically","when","update","is","called",".","If","update","is","called","with","update_params=True","and","refit_interval","or","more","has","elapsed","since","the","last","fit",",","refits","the","forecaster","instead","(","call","to","fit",")",".","refitting","is","done","on","(","potentially",")","all","data","seen","so","far",".","refit_window","controls","the","lookback","window","on","which","refitting","is","done","refit","data","is","cutoff","(","inclusive",")","to","cutoff","minus","refit_window","(","exclusive",")","Parameters","--","--","--","--","--","refit_interval",":","difference","of","sktime","time","indices","(","int","or","timedelta",")",",","optional","interval","that","needs","to","elapse","after","which","the","first","update","defaults","to","fit","default","=","0",",","i.e.",",","always","refits",",","never","updates","if","index","of","y","seen","in","fit","is","integer","or","y","is","index-free","container","type",",","refit_interval","must","be","int",",","and","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","refit","elapsed","if","int",",","will","be","interpreted","as","number","of","time","stamps","seen","since","last","refit","refit_window_size",":","difference","of","sktime","time","indices","(","int","or","timedelta",")",",","optional","length","of","the","data","window","to","refit","to","in","case","update","calls","fit","default","=","inf",",","i.e.",",","refits","to","entire","training","data","seen","so","far","refit_window_lag",":","difference","of","sktime","indices","(","int","or","timedelta",")",",","optional","lag","of","the","data","window","to","refit","to",",","w.r.t",".","cutoff",",","in","case","update","calls","fit","default","=","0",",","i.e.",",","refit","window","ends","with","and","includes","cutoff"]
code: def __init__(
      self,
      forecaster,
      refit_interval=0,
      refit_window_size=None,
      refit_window_lag=0,
  ):
      self.forecaster = forecaster
      self.forecaster_ = forecaster.clone()
  
      self.refit_interval = refit_interval
      self.refit_window_size = refit_window_size
      self.refit_window_lag = refit_window_lag
  
      super().__init__()
  
      self.clone_tags(forecaster, TAGS_TO_CLONE)
  
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 1 to create a new UpdateRefitsEvery object from inherited base classes: _DelegatedForecaster with example: obj = UpdateRefitsEvery(forecaster, refit_interval, refit_window_size, refit_window_lag)