class_docstr: Example:
      >>> import numpy as np
      >>> model = TCMFForecaster()
      >>> fit_params = dict(val_len=12,
                         start_date="2020-1-1",
                         freq="5min",
                         y_iters=1,
                         init_FX_epoch=1,
                         max_FX_epoch=1,
                         max_TCN_epoch=1,
                         alt_iters=2)
      >>> ndarray_input = {'id': np.arange(300), 'y': np.random.rand(300, 480)}
      >>> model.fit(ndarray_input, fit_params)
      >>> horizon = np.random.randint(1, 50)
      >>> yhat = model.predict(horizon=horizon)
      >>> model.save({tempdirname})
      >>> loaded_model = TCMFForecaster.load({tempdirname}, is_xshards_distributed=False)
      >>> data_new = np.random.rand(300, horizon)
      >>> model.evaluate(target_value=dict({"y": data_new}), metric=['mse'])
      >>> model.fit_incremental({"y": data_new})
      >>> yhat_incr = model.predict(horizon=horizon)
class_docstr_tok: ["Example",":",">",">",">","import","numpy","as","np",">",">",">","model","=","TCMFForecaster","(",")",">",">",">","fit_params","=","dict","(","val_len=12",",","start_date=","''","2020-1-1","''",",","freq=","''","5min","''",",","y_iters=1",",","init_FX_epoch=1",",","max_FX_epoch=1",",","max_TCN_epoch=1",",","alt_iters=2",")",">",">",">","ndarray_input","=","{","'id","'",":","np.arange","(","300",")",",","'","y","'",":","np.random.rand","(","300",",","480",")","}",">",">",">","model.fit","(","ndarray_input",",","fit_params",")",">",">",">","horizon","=","np.random.randint","(","1",",","50",")",">",">",">","yhat","=","model.predict","(","horizon=horizon",")",">",">",">","model.save","(","{","tempdirname","}",")",">",">",">","loaded_model","=","TCMFForecaster.load","(","{","tempdirname","}",",","is_xshards_distributed=False",")",">",">",">","data_new","=","np.random.rand","(","300",",","horizon",")",">",">",">","model.evaluate","(","target_value=dict","(","{","``","y","''",":","data_new","}",")",",","metric=","[","'mse","'","]",")",">",">",">","model.fit_incremental","(","{","``","y","''",":","data_new","}",")",">",">",">","yhat_incr","=","model.predict","(","horizon=horizon",")"]
docstr: Incrementally fit the model. Note that we only incrementally fit X_seq (TCN in global model)
  
  :param x_incr: incremental data to be fitted. It should be of the same format as input x in
      fit, which is a dict of ndarray or SparkXShards of dict of ndarray.
      Example: {'id': id_arr, 'y': incr_ndarray}, and incr_ndarray is of shape (n, T_incr)
      , where n is the number of target time series, T_incr is the number of time steps
      incremented. You can choose not to input 'id' in x_incr, but if you do, the elements
      of id in x_incr should be the same as id in x of fit.
  :param covariates_incr: covariates corresponding to x_incr. 2-D ndarray or None.
      The shape of ndarray should be (r, T_incr), where r is the number of covariates.
      Global covariates for all time series. If None, only default time coveriates will be
      used while use_time is True. If not, the time coveriates used is the stack of input
      covariates and default time coveriates.
  :param dti_incr: dti corresponding to the x_incr. DatetimeIndex or None.
      If None, use default fixed frequency DatetimeIndex generated with the last date of x in
      fit and freq.
docstr_tok: ["Incrementally","fit","the","model",".","Note","that","we","only","incrementally","fit","X_seq","(","TCN","in","global","model",")",":","param","x_incr",":","incremental","data","to","be","fitted",".","It","should","be","of","the","same","format","as","input","x","in","fit",",","which","is","a","dict","of","ndarray","or","SparkXShards","of","dict","of","ndarray",".","Example",":","{","'id","'",":","id_arr",",","'","y","'",":","incr_ndarray","}",",","and","incr_ndarray","is","of","shape","(","n",",","T_incr",")",",","where","n","is","the","number","of","target","time","series",",","T_incr","is","the","number","of","time","steps","incremented",".","You","can","choose","not","to","input","'id","'","in","x_incr",",","but","if","you","do",",","the","elements","of","id","in","x_incr","should","be","the","same","as","id","in","x","of","fit",".",":","param","covariates_incr",":","covariates","corresponding","to","x_incr",".","2-D","ndarray","or","None",".","The","shape","of","ndarray","should","be","(","r",",","T_incr",")",",","where","r","is","the","number","of","covariates",".","Global","covariates","for","all","time","series",".","If","None",",","only","default","time","coveriates","will","be","used","while","use_time","is","True",".","If","not",",","the","time","coveriates","used","is","the","stack","of","input","covariates","and","default","time","coveriates",".",":","param","dti_incr",":","dti","corresponding","to","the","x_incr",".","DatetimeIndex","or","None",".","If","None",",","use","default","fixed","frequency","DatetimeIndex","generated","with","the","last","date","of","x","in","fit","and","freq","."]
code: def fit_incremental(
      self, x_incr, covariates_incr=None, dti_incr=None
  ):
      """
      Incrementally fit the model. Note that we only incrementally fit X_seq (TCN in global model)
  
      :param x_incr: incremental data to be fitted. It should be of the same format as input x in
          fit, which is a dict of ndarray or SparkXShards of dict of ndarray.
          Example: {'id': id_arr, 'y': incr_ndarray}, and incr_ndarray is of shape (n, T_incr)
          , where n is the number of target time series, T_incr is the number of time steps
          incremented. You can choose not to input 'id' in x_incr, but if you do, the elements
          of id in x_incr should be the same as id in x of fit.
      :param covariates_incr: covariates corresponding to x_incr. 2-D ndarray or None.
          The shape of ndarray should be (r, T_incr), where r is the number of covariates.
          Global covariates for all time series. If None, only default time coveriates will be
          used while use_time is True. If not, the time coveriates used is the stack of input
          covariates and default time coveriates.
      :param dti_incr: dti corresponding to the x_incr. DatetimeIndex or None.
          If None, use default fixed frequency DatetimeIndex generated with the last date of x in
          fit and freq.
      """
      self.internal.fit_incremental(
          x_incr, covariates_incr=covariates_incr, dti_incr=dti_incr
      )
  
file_path: analytics-zoo/pyzoo/zoo/chronos/forecaster/tcmf_forecaster.py
imports: from zoo.chronos.model.tcmf_model import TCMFNdarrayModelWrapper, TCMFXshardsModelWrapper
  from zoo.orca.data import SparkXShards
  from zoo.chronos.forecaster.abstract import Forecaster
label_desc: Use image node_id 3 for calling the TCMFForecaster obj's underlying member method code with example usage: obj.fit_incremental(x_incr, covariates_incr, dti_incr) without return types