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: Returns the model's forecast on a batch of timestamps given.
  
  :param time_stamps_list: a list of lists of timestamps we wish to forecast for
  :param time_series_prev_list: a list of TimeSeries immediately preceding the time stamps in time_stamps_list
  :param return_iqr: whether to return the inter-quartile range for the forecast.
      Only supported by models which can return error bars.
  :param return_prev: whether to return the forecast for ``time_series_prev`` (and its stderr or IQR if relevant),
      in addition to the forecast for ``time_stamps``. Only used if ``time_series_prev`` is provided.
  :return: ``(forecast, forecast_stderr)`` if ``return_iqr`` is false,
      ``(forecast, forecast_lb, forecast_ub)`` otherwise.
  
      - ``forecast``: the forecast for the timestamps given
      - ``forecast_stderr``: the standard error of each forecast value. May be ``None``.
      - ``forecast_lb``: 25th percentile of forecast values for each timestamp
      - ``forecast_ub``: 75th percentile of forecast values for each timestamp
docstr_tok: ["Returns","the","model","'s","forecast","on","a","batch","of","timestamps","given",".",":","param","time_stamps_list",":","a","list","of","lists","of","timestamps","we","wish","to","forecast","for",":","param","time_series_prev_list",":","a","list","of","TimeSeries","immediately","preceding","the","time","stamps","in","time_stamps_list",":","param","return_iqr",":","whether","to","return","the","inter-quartile","range","for","the","forecast",".","Only","supported","by","models","which","can","return","error","bars",".",":","param","return_prev",":","whether","to","return","the","forecast","for","``","time_series_prev","``","(","and","its","stderr","or","IQR","if","relevant",")",",","in","addition","to","the","forecast","for","``","time_stamps","``",".","Only","used","if","``","time_series_prev","``","is","provided",".",":","return",":","``","(","forecast",",","forecast_stderr",")","``","if","``","return_iqr","``","is","false",",","``","(","forecast",",","forecast_lb",",","forecast_ub",")","``","otherwise",".","-","``","forecast","``",":","the","forecast","for","the","timestamps","given","-","``","forecast_stderr","``",":","the","standard","error","of","each","forecast","value",".","May","be","``","None","``",".","-","``","forecast_lb","``",":","25th","percentile","of","forecast","values","for","each","timestamp","-","``","forecast_ub","``",":","75th","percentile","of","forecast","values","for","each","timestamp"]
code: def batch_forecast(
      self,
      time_stamps_list: List[List[int]],
      time_series_prev_list: List[TimeSeries],
      return_iqr: bool = False,
      return_prev: bool = False,
  ) -> Tuple[
      Union[
          Tuple[List[TimeSeries], List[Optional[TimeSeries]]],
          Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries]],
      ]
  ]:
      """
      Returns the model's forecast on a batch of timestamps given.
  
      :param time_stamps_list: a list of lists of timestamps we wish to forecast for
      :param time_series_prev_list: a list of TimeSeries immediately preceding the time stamps in time_stamps_list
      :param return_iqr: whether to return the inter-quartile range for the forecast.
          Only supported by models which can return error bars.
      :param return_prev: whether to return the forecast for ``time_series_prev`` (and its stderr or IQR if relevant),
          in addition to the forecast for ``time_stamps``. Only used if ``time_series_prev`` is provided.
      :return: ``(forecast, forecast_stderr)`` if ``return_iqr`` is false,
          ``(forecast, forecast_lb, forecast_ub)`` otherwise.
  
          - ``forecast``: the forecast for the timestamps given
          - ``forecast_stderr``: the standard error of each forecast value. May be ``None``.
          - ``forecast_lb``: 25th percentile of forecast values for each timestamp
          - ``forecast_ub``: 75th percentile of forecast values for each timestamp
      """
      out_list = []
      if time_series_prev_list is None:
          time_series_prev_list = [
              None for _ in range(len(time_stamps_list))
          ]
      for time_stamps, time_series_prev in zip(
          time_stamps_list, time_series_prev_list
      ):
          out = self.forecast(
              time_stamps=time_stamps,
              time_series_prev=time_series_prev,
              return_iqr=return_iqr,
              return_prev=return_prev,
          )
          out_list.append(out)
      return tuple(zip(*out_list))
  
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 18 for calling the ForecasterBase obj's underlying member method code with example usage: obj.batch_forecast(time_stamps_list, time_series_prev_list, return_iqr, return_prev) and returns: tuple