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: Build a TCMF Forecast Model.
  
  :param vbsize: int, default is 128.
      Vertical batch size, which is the number of cells per batch.
  :param hbsize: int, default is 256.
      Horizontal batch size, which is the number of time series per batch.
  :param num_channels_X: list, default=[32, 32, 32, 32, 32, 1].
      List containing channel progression of temporal convolution network for local model
  :param num_channels_Y: list, default=[16, 16, 16, 16, 16, 1]
      List containing channel progression of temporal convolution network for hybrid model.
  :param kernel_size: int, default is 7.
      Kernel size for local models
  :param dropout: float, default is 0.1.
      Dropout rate during training
  :param rank: int, default is 64.
      The rank in matrix factorization of global model.
  :param kernel_size_Y: int, default is 7.
      Kernel size of hybrid model
  :param learning_rate: float, default is 0.0005
  :param normalize: boolean, false by default.
      Whether to normalize input data for training.
  :param use_time: boolean, default is True.
      Whether to use time coveriates.
  :param svd: boolean, default is False.
      Whether factor matrices are initialized by NMF
docstr_tok: ["Build","a","TCMF","Forecast","Model",".",":","param","vbsize",":","int",",","default","is","128",".","Vertical","batch","size",",","which","is","the","number","of","cells","per","batch",".",":","param","hbsize",":","int",",","default","is","256",".","Horizontal","batch","size",",","which","is","the","number","of","time","series","per","batch",".",":","param","num_channels_X",":","list",",","default=","[","32",",","32",",","32",",","32",",","32",",","1","]",".","List","containing","channel","progression","of","temporal","convolution","network","for","local","model",":","param","num_channels_Y",":","list",",","default=","[","16",",","16",",","16",",","16",",","16",",","1","]","List","containing","channel","progression","of","temporal","convolution","network","for","hybrid","model",".",":","param","kernel_size",":","int",",","default","is","7",".","Kernel","size","for","local","models",":","param","dropout",":","float",",","default","is","0.1",".","Dropout","rate","during","training",":","param","rank",":","int",",","default","is","64",".","The","rank","in","matrix","factorization","of","global","model",".",":","param","kernel_size_Y",":","int",",","default","is","7",".","Kernel","size","of","hybrid","model",":","param","learning_rate",":","float",",","default","is","0.0005",":","param","normalize",":","boolean",",","false","by","default",".","Whether","to","normalize","input","data","for","training",".",":","param","use_time",":","boolean",",","default","is","True",".","Whether","to","use","time","coveriates",".",":","param","svd",":","boolean",",","default","is","False",".","Whether","factor","matrices","are","initialized","by","NMF"]
code: def __init__(
      self,
      vbsize=128,
      hbsize=256,
      num_channels_X=[32, 32, 32, 32, 32, 1],
      num_channels_Y=[16, 16, 16, 16, 16, 1],
      kernel_size=7,
      dropout=0.1,
      rank=64,
      kernel_size_Y=7,
      learning_rate=0.0005,
      normalize=False,
      use_time=True,
      svd=True,
  ):
      """
      Build a TCMF Forecast Model.
  
      :param vbsize: int, default is 128.
          Vertical batch size, which is the number of cells per batch.
      :param hbsize: int, default is 256.
          Horizontal batch size, which is the number of time series per batch.
      :param num_channels_X: list, default=[32, 32, 32, 32, 32, 1].
          List containing channel progression of temporal convolution network for local model
      :param num_channels_Y: list, default=[16, 16, 16, 16, 16, 1]
          List containing channel progression of temporal convolution network for hybrid model.
      :param kernel_size: int, default is 7.
          Kernel size for local models
      :param dropout: float, default is 0.1.
          Dropout rate during training
      :param rank: int, default is 64.
          The rank in matrix factorization of global model.
      :param kernel_size_Y: int, default is 7.
          Kernel size of hybrid model
      :param learning_rate: float, default is 0.0005
      :param normalize: boolean, false by default.
          Whether to normalize input data for training.
      :param use_time: boolean, default is True.
          Whether to use time coveriates.
      :param svd: boolean, default is False.
          Whether factor matrices are initialized by NMF
      """
      self.internal = None
      self.config = {
          "vbsize": vbsize,
          "hbsize": hbsize,
          "num_channels_X": num_channels_X,
          "num_channels_Y": num_channels_Y,
          "kernel_size": kernel_size,
          "dropout": dropout,
          "rank": rank,
          "kernel_size_Y": kernel_size_Y,
          "learning_rate": learning_rate,
          "normalize": normalize,
          "use_time": use_time,
          "svd": svd,
      }
  
file_path: BigDL/python/chronos/src/bigdl/chronos/forecaster/tcmf_forecaster.py
imports: from bigdl.chronos.model.tcmf_model import TCMFNdarrayModelWrapper, TCMFXshardsModelWrapper
  from bigdl.orca.data import SparkXShards
  from bigdl.chronos.forecaster.abstract import Forecaster
label_desc: Use image node_id 1 to create a new TCMFForecaster object from inherited base classes: Forecaster with example: obj = TCMFForecaster(vbsize, hbsize, num_channels_X, num_channels_Y, kernel_size, dropout, rank, kernel_size_Y, learning_rate, normalize, use_time, svd)