class_docstr: Abstract base class for time series classifiers.
  
  The base classifier specifies the methods and method signatures that all
  classifiers have to implement. Attributes with an underscore suffix are set in the
  method fit.
  
  Parameters
  ----------
  classes_            : ndarray of class labels, possibly strings
  n_classes_          : integer, number of classes (length of classes_)
  fit_time_           : integer, time (in milliseconds) for fit to run.
  _class_dictionary   : dictionary mapping classes_ onto integers 0...n_classes_-1.
  _threads_to_use     : number of threads to use in fit as determined by n_jobs.
docstr: Boilerplate logic for fit_predict and fit_predict_proba.
docstr_tok: ["Boilerplate","logic","for","fit_predict","and","fit_predict_proba","."]
code: def _fit_predict_boilerplate(self, X, y, cv, change_state, method):
      """Boilerplate logic for fit_predict and fit_predict_proba."""
      from sklearn.model_selection import KFold
  
      if isinstance(cv, int):
          random_state = getattr(self, "random_state", None)
          cv = KFold(cv, random_state=random_state, shuffle=True)
  
      if change_state:
          self.reset()
          est = self
      else:
          est = self.clone()
  
      if cv is None:
          return getattr(est.fit(X, y), method)(X)
      elif change_state:
          self.fit(X, y)
  
      # we now know that cv is an sklearn splitter
      X, y = self._internal_convert(X, y)
      X_metadata = self._check_input(
          X, y, return_metadata=self.METADATA_REQ_IN_CHECKS
      )
      X_mtype = X_metadata["mtype"]
      # Check this classifier can handle characteristics
      self._check_capabilities(X_metadata)
  
      # handle single class case
      if len(self._class_dictionary) == 1:
          return self._single_class_y_pred(X)
  
      # Convert data to format easily usable for applying cv
      if isinstance(X, np.ndarray):
          X = convert(
              X,
              from_type=X_mtype,
              to_type="numpy3D",
              as_scitype="Panel",
              store_behaviour="freeze",
          )
      else:
          X = convert(
              X,
              from_type=X_mtype,
              to_type="nested_univ",
              as_scitype="Panel",
              store_behaviour="freeze",
          )
  
      if method == "predict_proba":
          y_pred = np.empty([len(y), len(np.unique(y))])
      else:
          y_pred = np.empty_like(y)
      y_pred[:] = -1
      if isinstance(X, np.ndarray):
          for tr_idx, tt_idx in cv.split(X):
              X_train = X[tr_idx]
              X_test = X[tt_idx]
              y_train = y[tr_idx]
              fitted_est = self.clone().fit(X_train, y_train)
              y_pred[tt_idx] = getattr(fitted_est, method)(X_test)
      else:
          for tr_idx, tt_idx in cv.split(X):
              X_train = X.iloc[tr_idx]
              X_test = X.iloc[tt_idx]
              y_train = y[tr_idx]
              fitted_est = self.clone().fit(X_train, y_train)
              y_pred[tt_idx] = getattr(fitted_est, method)(X_test)
  
      return y_pred
  
imports: import time
  import numpy
  from sktime.base import BasePanelMixin
  from sktime.datatypes import VectorizedDF, check_is_scitype, convert
  from sktime.utils.sklearn import is_sklearn_transformer
  from sktime.utils.validation import check_n_jobs
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 7 for calling the BaseClassifier obj's underlying member method code with example usage: obj._fit_predict_boilerplate(X, y, cv, change_state, method) and returns: y_pred, getattr, self