docstr: Abstract class for providing template of how a forecaster works by containing a model under `ModelTemplate`
  
  Parameters
  ----------
  model : an instance of a concrete model
  estimator_type : class of estimator
      StanEstimatorMAP, StanEstimatorMCMC, or PyroEstimatorVI
  response_col : str
      Name of response variable column, default 'y'
  date_col : str
      Name of date variable column, default 'ds'
  n_bootstrap_draws : int
      Number of samples to bootstrap in order to generate the prediction interval. For full Bayesian and
      variational inference forecasters, samples are drawn directly from original posteriors. For point-estimated
      posteriors, it will be used to sample noise parameters.  When -1 or None supplied, full Bayesian and
      variational inference forecasters will assume number of draws equal the size of original samples while
      point-estimated posteriors will mute the draw and output prediction without interval.
  prediction_percentiles : list
      List of integers of prediction percentiles that should be returned on prediction. To avoid reporting any
      confident intervals, pass an empty list
  
  **kwargs:
      additional arguments passed into orbit.estimators.stan_estimator or orbit.estimators.pyro_estimator
docstr_tok: ["Abstract","class","for","providing","template","of","how","a","forecaster","works","by","containing","a","model","under","`","ModelTemplate","`","Parameters","--","--","--","--","--","model",":","an","instance","of","a","concrete","model","estimator_type",":","class","of","estimator","StanEstimatorMAP",",","StanEstimatorMCMC",",","or","PyroEstimatorVI","response_col",":","str","Name","of","response","variable","column",",","default","'","y'","date_col",":","str","Name","of","date","variable","column",",","default","'ds'","n_bootstrap_draws",":","int","Number","of","samples","to","bootstrap","in","order","to","generate","the","prediction","interval",".","For","full","Bayesian","and","variational","inference","forecasters",",","samples","are","drawn","directly","from","original","posteriors",".","For","point-estimated","posteriors",",","it","will","be","used","to","sample","noise","parameters",".","When","-1","or","None","supplied",",","full","Bayesian","and","variational","inference","forecasters","will","assume","number","of","draws","equal","the","size","of","original","samples","while","point-estimated","posteriors","will","mute","the","draw","and","output","prediction","without","interval",".","prediction_percentiles",":","list","List","of","integers","of","prediction","percentiles","that","should","be","returned","on","prediction",".","To","avoid","reporting","any","confident","intervals",",","pass","an","empty","list","*","*","kwargs",":","additional","arguments","passed","into","orbit.estimators.stan_estimator","or","orbit.estimators.pyro_estimator"]
code: def __init__(
      self,
      model,
      estimator_type,
      response_col="y",
      date_col="ds",
      n_bootstrap_draws=-1,
      prediction_percentiles=None,
      **kwargs,
  ):
      """Abstract class for providing template of how a forecaster works by containing a model under `ModelTemplate`
  
      Parameters
      ----------
      model : an instance of a concrete model
      estimator_type : class of estimator
          StanEstimatorMAP, StanEstimatorMCMC, or PyroEstimatorVI
      response_col : str
          Name of response variable column, default 'y'
      date_col : str
          Name of date variable column, default 'ds'
      n_bootstrap_draws : int
          Number of samples to bootstrap in order to generate the prediction interval. For full Bayesian and
          variational inference forecasters, samples are drawn directly from original posteriors. For point-estimated
          posteriors, it will be used to sample noise parameters.  When -1 or None supplied, full Bayesian and
          variational inference forecasters will assume number of draws equal the size of original samples while
          point-estimated posteriors will mute the draw and output prediction without interval.
      prediction_percentiles : list
          List of integers of prediction percentiles that should be returned on prediction. To avoid reporting any
          confident intervals, pass an empty list
  
      **kwargs:
          additional arguments passed into orbit.estimators.stan_estimator or orbit.estimators.pyro_estimator
      """
  
      # general fields
      if not isinstance(model, ModelTemplate):
          raise ForecasterException(
              "Invalid class of model argument supplied."
          )
      self._model = model
      method_list = [
          attr
          for attr in dir(model)
          # only load public methods
          if (
              callable(getattr(model, attr))
              and not attr.startswith("__")
              and not attr.startswith("_")
              and attr not in COMMON_MODEL_CALLABLES
          )
      ]
      self.extra_methods = method_list
      self.response_col = response_col
      self.date_col = date_col
      self._validate_supported_estimator_type(estimator_type)
      self.estimator_type = estimator_type
      self.estimator = self.estimator_type(**kwargs)
  
      self.n_bootstrap_draws = n_bootstrap_draws
      # n_bootstrap_draws holds original input
      # _n_bootstrap_draws is validated input to handle default value
  
      if not self.n_bootstrap_draws:
          self._n_bootstrap_draws = -1
      else:
          self._n_bootstrap_draws = int(self.n_bootstrap_draws)
  
      self.prediction_percentiles = prediction_percentiles
      self._prediction_percentiles = None
  
      if self.prediction_percentiles is None:
          self._prediction_percentiles = [5, 95]
      else:
          self._prediction_percentiles = deepcopy(
              self.prediction_percentiles
          )
  
      self._prediction_percentiles += [50]  # always find median
      self._prediction_percentiles = list(
          set(self._prediction_percentiles)
      )  # avoid duplicates
      self._prediction_percentiles.sort()
  
      # fields from fit and predict process
      # set by ._set_training_meta() in fit process
      self._training_meta = dict()
      self._training_data_input = dict()
      # fitted results after fit process
      self._posterior_samples = dict()
      self._point_posteriors = dict()
      self._training_metrics = None
  
      # set by ._set_prediction_meta() in predict process
      self._prediction_meta = dict()
      self.prediction_array = None
  
      # determine point approximation method of posteriors
      self._point_method = None
  
imports: from copy import deepcopy
  import numpy
  import pandas
  import warnings
  from enum import Enum
  from typing import Dict, Any
  from ..exceptions import ForecasterException, AbstractMethodException, IllegalArgument
  from ..utils.general import is_ordered_datetime, is_even_gap_datetime
  from ..template.model_template import ModelTemplate
  from ..estimators.stan_estimator import StanEstimatorMCMC
  from ..constants.constants import TrainingMetaKeys, PredictionMetaKeys
label_desc: Use image node_id 1 to create a new Forecaster object from inherited base classes: object with example: obj = Forecaster(model, estimator_type, response_col, date_col, n_bootstrap_draws, prediction_percentiles)