class_docstr: Base class for a forecaster model.
  
  .. note::
  
      If your model depends on an evenly spaced time series, make sure to
  
      1. Call `ForecasterBase.train_pre_process` in `ForecasterBase.train`
      2. Call `ForecasterBase.resample_time_stamps` at the start of
         `ForecasterBase.forecast` to get a set of resampled time stamps, and
         call ``time_series.align(reference=time_stamps)`` to align the forecast
         with the original time stamps.
class_docstr_tok: ["Base","class","for","a","forecaster","model",".","..","note",":",":","If","your","model","depends","on","an","evenly","spaced","time","series",",","make","sure","to","1",".","Call","`","ForecasterBase.train_pre_process","`","in","`","ForecasterBase.train","`","2",".","Call","`","ForecasterBase.resample_time_stamps","`","at","the","start","of","`","ForecasterBase.forecast","`","to","get","a","set","of","resampled","time","stamps",",","and","call","``","time_series.align","(","reference=time_stamps",")","``","to","align","the","forecast","with","the","original","time","stamps","."]
docstr: Trains the forecaster on the input time series.
  
  :param train_data: a `TimeSeries` of metric values to train the model.
  :param train_config: Additional training configs, if needed. Only required for some models.
  :param exog_data: A time series of exogenous variables, sampled at the same time stamps as ``train_data``.
      Exogenous variables are known a priori, and they are independent of the variable being forecasted.
      Only supported for models which inherit from `ForecasterExogBase`.
  
  :return: the model's prediction on ``train_data``, in the same format as
      if you called `ForecasterBase.forecast` on the time stamps of ``train_data``
docstr_tok: ["Trains","the","forecaster","on","the","input","time","series",".",":","param","train_data",":","a","`","TimeSeries","`","of","metric","values","to","train","the","model",".",":","param","train_config",":","Additional","training","configs",",","if","needed",".","Only","required","for","some","models",".",":","param","exog_data",":","A","time","series","of","exogenous","variables",",","sampled","at","the","same","time","stamps","as","``","train_data","``",".","Exogenous","variables","are","known","a","priori",",","and","they","are","independent","of","the","variable","being","forecasted",".","Only","supported","for","models","which","inherit","from","`","ForecasterExogBase","`",".",":","return",":","the","model","'s","prediction","on","``","train_data","``",",","in","the","same","format","as","if","you","called","`","ForecasterBase.forecast","`","on","the","time","stamps","of","``","train_data","``"]
code: def train(
      self,
      train_data: TimeSeries,
      train_config=None,
      exog_data: TimeSeries = None,
  ) -> Tuple[TimeSeries, Optional[TimeSeries]]:
      """
      Trains the forecaster on the input time series.
  
      :param train_data: a `TimeSeries` of metric values to train the model.
      :param train_config: Additional training configs, if needed. Only required for some models.
      :param exog_data: A time series of exogenous variables, sampled at the same time stamps as ``train_data``.
          Exogenous variables are known a priori, and they are independent of the variable being forecasted.
          Only supported for models which inherit from `ForecasterExogBase`.
  
      :return: the model's prediction on ``train_data``, in the same format as
          if you called `ForecasterBase.forecast` on the time stamps of ``train_data``
      """
      if train_config is None:
          train_config = copy.deepcopy(self._default_train_config)
      train_data, exog_data = self.train_pre_process(
          train_data, exog_data=exog_data, return_exog=True
      )
      if self._pandas_train:
          train_data = train_data.to_pd()
          exog_data = None if exog_data is None else exog_data.to_pd()
      if exog_data is None:
          train_result = self._train(
              train_data=train_data, train_config=train_config
          )
      else:
          train_result = self._train_with_exog(
              train_data=train_data,
              train_config=train_config,
              exog_data=exog_data,
          )
      return self.train_post_process(train_result)
  
imports: from abc import abstractmethod
  import copy
  import logging
  from typing import List, Optional, Tuple, Union
  import numpy
  import pandas
  from scipy.stats import norm
  from merlion.models.base import Config, ModelBase
  from merlion.plot import Figure
  from merlion.transform.base import TransformBase
  from merlion.transform.factory import TransformFactory
  from merlion.transform.normalize import MeanVarNormalize
  from merlion.utils.time_series import to_pd_datetime, to_timestamp, TimeSeries, AggregationPolicy, MissingValuePolicy
label_desc: Use image node_id 9 for calling the ForecasterBase obj's underlying member method code with example usage: obj.train(train_data, train_config, exog_data) and returns: self