class_docstr: Abstract base class for time series regressors.
  
  The base regressor specifies the methods and method signatures that all
  regressors have to implement. Attributes with a underscore suffix are set in the
  method fit.
  
  Parameters
  ----------
  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.
class_docstr_tok: ["Abstract","base","class","for","time","series","regressors",".","The","base","regressor","specifies","the","methods","and","method","signatures","that","all","regressors","have","to","implement",".","Attributes","with","a","underscore","suffix","are","set","in","the","method","fit",".","Parameters","--","--","--","--","--","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: Fit time series regressor to training data.
  
  State change:
      Changes state to "fitted".
  
  Writes to self:
      Sets self.is_fitted to True.
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  X : sktime compatible time series panel data container, Panel scitype, e.g.,
      pd-multiindex: pd.DataFrame with columns = variables,
      index = pd.MultiIndex with first level = instance indices,
      second level = time indices
      numpy3D: 3D np.array (any number of dimensions, equal length series)
      of shape [n_instances, n_dimensions, series_length]
      or of any other supported Panel mtype
      for list of mtypes, see datatypes.SCITYPE_REGISTER
      for specifications, see examples/AA_datatypes_and_datasets.ipynb
  y : sktime compatible tabular data container, Table scitype
      1D iterable, of shape [n_instances]
      or 2D iterable, of shape [n_instances, n_dimensions]
      class labels for fitting
      0-th indices correspond to instance indices in X
      1-st indices (if applicable) correspond to multioutput vector indices in X
      supported sktime types: np.ndarray (1D, 2D), pd.Series, pd.DataFrame
  
  Returns
  -------
  self : Reference to self.
  
  Notes
  -----
  Changes state by creating a fitted model that updates attributes
  ending in "_" and sets is_fitted flag to True.
docstr_tok: ["Fit","time","series","regressor","to","training","data",".","State","change",":","Changes","state","to","``","fitted","''",".","Writes","to","self",":","Sets","self.is_fitted","to","True",".","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","X",":","sktime","compatible","time","series","panel","data","container",",","Panel","scitype",",","e.g.",",","pd-multiindex",":","pd.DataFrame","with","columns","=","variables",",","index","=","pd.MultiIndex","with","first","level","=","instance","indices",",","second","level","=","time","indices","numpy3D",":","3D","np.array","(","any","number","of","dimensions",",","equal","length","series",")","of","shape","[","n_instances",",","n_dimensions",",","series_length","]","or","of","any","other","supported","Panel","mtype","for","list","of","mtypes",",","see","datatypes.SCITYPE_REGISTER","for","specifications",",","see","examples\/AA_datatypes_and_datasets.ipynb","y",":","sktime","compatible","tabular","data","container",",","Table","scitype","1D","iterable",",","of","shape","[","n_instances","]","or","2D","iterable",",","of","shape","[","n_instances",",","n_dimensions","]","class","labels","for","fitting","0-th","indices","correspond","to","instance","indices","in","X","1-st","indices","(","if","applicable",")","correspond","to","multioutput","vector","indices","in","X","supported","sktime","types",":","np.ndarray","(","1D",",","2D",")",",","pd.Series",",","pd.DataFrame","Returns","--","--","--","-","self",":","Reference","to","self",".","Notes","--","--","-","Changes","state","by","creating","a","fitted","model","that","updates","attributes","ending","in","``","_","''","and","sets","is_fitted","flag","to","True","."]
code: def fit(self, X, y):
      """Fit time series regressor to training data.
  
      State change:
          Changes state to "fitted".
  
      Writes to self:
          Sets self.is_fitted to True.
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      X : sktime compatible time series panel data container, Panel scitype, e.g.,
          pd-multiindex: pd.DataFrame with columns = variables,
          index = pd.MultiIndex with first level = instance indices,
          second level = time indices
          numpy3D: 3D np.array (any number of dimensions, equal length series)
          of shape [n_instances, n_dimensions, series_length]
          or of any other supported Panel mtype
          for list of mtypes, see datatypes.SCITYPE_REGISTER
          for specifications, see examples/AA_datatypes_and_datasets.ipynb
      y : sktime compatible tabular data container, Table scitype
          1D iterable, of shape [n_instances]
          or 2D iterable, of shape [n_instances, n_dimensions]
          class labels for fitting
          0-th indices correspond to instance indices in X
          1-st indices (if applicable) correspond to multioutput vector indices in X
          supported sktime types: np.ndarray (1D, 2D), pd.Series, pd.DataFrame
  
      Returns
      -------
      self : Reference to self.
  
      Notes
      -----
      Changes state by creating a fitted model that updates attributes
      ending in "_" and sets is_fitted flag to True.
      """
      self.reset()
  
      # fit timer start
      start = int(round(time.time() * 1000))
  
      # check and convert y for multioutput vectorization
      y, y_metadata, y_inner_mtype = self._check_y(
          y, return_to_mtype=True
      )
      self._y_metadata = y_metadata
      self._y_inner_mtype = y_inner_mtype
      self._is_vectorized = isinstance(y, VectorizedDF)
  
      if self._is_vectorized:
          self._vectorize("fit", X=X, y=y)
          # fit timer end
          self.fit_time_ = int(round(time.time() * 1000)) - start
          # this should happen last: fitted state is set to True
          self._is_fitted = True
          return self
  
      # no vectorization needed, proceed with normal fit
  
      # convenience conversions to allow user flexibility:
      # if X is 2D array, convert to 3D, if y is Series, convert to numpy
      X, y = self._internal_convert(X, y)
  
      # y float coercion
      if y is not None and isinstance(y, np.ndarray):
          y = y.astype("float")
  
      # input checks
      X_metadata = self._check_input(
          X, y, return_metadata=self.METADATA_REQ_IN_CHECKS
      )
      self._X_metadata = X_metadata
      X_mtype = X_metadata["mtype"]
  
      # Check this regressor can handle characteristics
      self._check_capabilities(X_metadata)
  
      # Convert data as dictated by the regressor tags
      X = self._convert_X(X, X_mtype)
      multithread = self.get_tag("capability:multithreading")
      if multithread:
          try:
              self._threads_to_use = check_n_jobs(self.n_jobs)
          except NameError:
              raise AttributeError(
                  "self.n_jobs must be set if capability:multithreading is True"
              )
  
      self._fit(X, y)
      self.fit_time_ = int(round(time.time() * 1000)) - start
  
      # this should happen last: fitted state is set to True
      self._is_fitted = True
      return self
  
file_path: sktime/sktime/regression/base.py
imports: import time
  import numpy
  from sktime.base import BasePanelMixin
  from sktime.datatypes import VectorizedDF
  from sktime.utils.sklearn import is_sklearn_transformer
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 3 for calling the BaseRegressor obj's underlying member method code with example usage: obj.fit(X, y) and returns: self, self