class_docstr: Base forecaster template class.
  
  The base forecaster specifies the methods and method signatures that all forecasters
  have to implement.
  
  Specific implementations of these methods is deferred to concrete forecasters.
class_docstr_tok: ["Base","forecaster","template","class",".","The","base","forecaster","specifies","the","methods","and","method","signatures","that","all","forecasters","have","to","implement",".","Specific","implementations","of","these","methods","is","deferred","to","concrete","forecasters","."]
docstr: Vectorized/iterated loop over method of BaseForecaster.
  
  Uses forecasters_ attribute to store one forecaster per loop index.
docstr_tok: ["Vectorized\/iterated","loop","over","method","of","BaseForecaster",".","Uses","forecasters_","attribute","to","store","one","forecaster","per","loop","index","."]
code: def _vectorize(self, methodname, **kwargs):
      """Vectorized/iterated loop over method of BaseForecaster.
  
      Uses forecasters_ attribute to store one forecaster per loop index.
      """
      FIT_METHODS = ["fit", "update"]
      PREDICT_METHODS = [
          "predict",
          "update_predict_single",
          "predict_quantiles",
          "predict_interval",
          "predict_var",
      ]
  
      # retrieve data arguments
      X = kwargs.pop("X", None)
      y = kwargs.get("y", None)
  
      # add some common arguments to kwargs
      kwargs["args_rowvec"] = {"X": X}
      kwargs["rowname_default"] = "forecasters"
      kwargs["colname_default"] = "forecasters"
  
      # fit-like methods: write y to self._yvec; then run method; clone first if fit
      if methodname in FIT_METHODS:
          self._yvec = y
  
          if methodname == "fit":
              forecasters_ = y.vectorize_est(
                  self,
                  method="clone",
                  rowname_default="forecasters",
                  colname_default="forecasters",
                  backend=self.get_config()["backend:parallel"],
                  backend_params=self.get_config()[
                      "backend:parallel:params"
                  ],
              )
          else:
              forecasters_ = self.forecasters_
  
          self.forecasters_ = y.vectorize_est(
              forecasters_,
              method=methodname,
              backend=self.get_config()["backend:parallel"],
              backend_params=self.get_config()[
                  "backend:parallel:params"
              ],
              **kwargs,
          )
          return self
  
      # predict-like methods: return as list, then run through reconstruct
      # to obtain a pandas based container in one of the pandas mtype formats
      elif methodname in PREDICT_METHODS:
          if methodname == "update_predict_single":
              self._yvec = y
  
          y_preds = self._yvec.vectorize_est(
              self.forecasters_,
              method=methodname,
              return_type="list",
              backend=self.get_config()["backend:parallel"],
              backend_params=self.get_config()[
                  "backend:parallel:params"
              ],
              **kwargs,
          )
  
          # if we vectorize over columns,
          #   we need to replace top column level with variable names - part 1
          m = len(self.forecasters_.columns)
          col_multiindex = "multiindex" if m > 1 else "none"
          y_pred = self._yvec.reconstruct(
              y_preds,
              overwrite_index=True,
              col_multiindex=col_multiindex,
          )
          # if vectorize over columns replace top column level with variable names
          if col_multiindex == "multiindex":
              y_pred.columns = y_pred.columns.droplevel(1)
          return y_pred
  
imports: from copy import deepcopy
  from itertools import product
  import numpy
  import pandas
  from sktime.base import BaseEstimator
  from sktime.datatypes import VectorizedDF, check_is_scitype, convert_to, get_cutoff, mtype_to_scitype, scitype_to_mtype, update_data
  from sktime.forecasting.base._fh import ForecastingHorizon
  from sktime.utils.datetime import _shift
  from sktime.utils.validation._dependencies import _check_estimator_deps
  from sktime.utils.validation.forecasting import check_alpha, check_cv, check_fh, check_X
  from sktime.utils.validation.series import check_equal_time_index
  from sktime.utils.warnings import warn
label_desc: Use image node_id 29 for calling the BaseForecaster obj's underlying member method code with example usage: obj._vectorize(methodname) and returns: self, y_pred