class_docstr: MF regularized TCN + TCN. This version is not for automated searching yet.
class_docstr_tok: ["MF","regularized","TCN","+","TCN",".","This","version","is","not","for","automated","searching","yet","."]
docstr: Fit on the training data from scratch.
  Since the rolling process is very customized in this model,
  we enclose the rolling process inside this method.
  :param data: could be a tuple with numpy ndarray with form (x, y)
         x: training data, an array in shape (nd, Td),
            nd is the number of series, Td is the time dimension
         y: None. target is extracted from x directly
  :param verbose:
  :param num_workers: number of workers to use.
  :return: the evaluation metric value
docstr_tok: ["Fit","on","the","training","data","from","scratch",".","Since","the","rolling","process","is","very","customized","in","this","model",",","we","enclose","the","rolling","process","inside","this","method",".",":","param","data",":","could","be","a","tuple","with","numpy","ndarray","with","form","(","x",",","y",")","x",":","training","data",",","an","array","in","shape","(","nd",",","Td",")",",","nd","is","the","number","of","series",",","Td","is","the","time","dimension","y",":","None",".","target","is","extracted","from","x","directly",":","param","verbose",":",":","param","num_workers",":","number","of","workers","to","use",".",":","return",":","the","evaluation","metric","value"]
code: def fit_eval(self, data, verbose=0, num_workers=None, **config):
      """
      Fit on the training data from scratch.
      Since the rolling process is very customized in this model,
      we enclose the rolling process inside this method.
      :param data: could be a tuple with numpy ndarray with form (x, y)
             x: training data, an array in shape (nd, Td),
                nd is the number of series, Td is the time dimension
             y: None. target is extracted from x directly
      :param verbose:
      :param num_workers: number of workers to use.
      :return: the evaluation metric value
      """
      x = data[0]
      if not self.model_init:
          self.build(config)
      if num_workers is None:
          num_workers = TCMF.get_default_num_workers()
      covariates = config.get("covariates", None)
      dti = config.get("dti", None)
      self._check_covariates_dti(
          covariates=covariates, dti=dti, ts_len=x.shape[1]
      )
      val_loss = self.model.train_all_models(
          x,
          val_len=config.get("val_len", 24),
          start_date=config.get("start_date", "2020-4-1"),
          freq=config.get("freq", "1H"),
          covariates=covariates,
          dti=dti,
          period=config.get("period", 24),
          init_epochs=config.get("init_FX_epoch", 100),
          alt_iters=config.get("alt_iters", 10),
          y_iters=config.get("y_iters", 10),
          max_FX_epoch=config.get("max_FX_epoch", 300),
          max_TCN_epoch=config.get("max_TCN_epoch", 300),
          num_workers=num_workers,
      )
      return {"val_loss": val_loss}
  
imports: from abc import ABCMeta, abstractmethod
  from bigdl.chronos.model.tcmf import DeepGLO
  from bigdl.orca.automl.metrics import Evaluator
  from bigdl.orca.automl.model.abstract import BaseModel
  from bigdl.orca.data import SparkXShards, XShards
  import pickle
  import numpy
  import pandas
label_desc: Use image node_id 3 for calling the TCMF obj's underlying member method code with example usage: obj.fit_eval(data, verbose, num_workers) and returns: dict