class_docstr: Base time series forest classifier.
class_docstr_tok: ["Base","time","series","forest","classifier","."]
docstr: Build a forest of trees from the training set (X, y).
  
  Parameters
  ----------
  Xt: np.ndarray or pd.DataFrame
      Panel training data.
  y : np.ndarray
      The class labels.
  
  Returns
  -------
  self : object
      An fitted instance of the classifier
docstr_tok: ["Build","a","forest","of","trees","from","the","training","set","(","X",",","y",")",".","Parameters","--","--","--","--","--","Xt",":","np.ndarray","or","pd.DataFrame","Panel","training","data",".","y",":","np.ndarray","The","class","labels",".","Returns","--","--","--","-","self",":","object","An","fitted","instance","of","the","classifier"]
code: def _fit(self, X, y):
      """Build a forest of trees from the training set (X, y).
  
      Parameters
      ----------
      Xt: np.ndarray or pd.DataFrame
          Panel training data.
      y : np.ndarray
          The class labels.
  
      Returns
      -------
      self : object
          An fitted instance of the classifier
      """
      X = X.squeeze(1)
      n_instances, self.series_length = X.shape
  
      n_jobs = check_n_jobs(self.n_jobs)
  
      rng = check_random_state(self.random_state)
  
      self.n_classes = np.unique(y).shape[0]
  
      self.classes_ = class_distribution(np.asarray(y).reshape(-1, 1))[
          0
      ][0]
      self.n_intervals = int(math.sqrt(self.series_length))
      if self.n_intervals == 0:
          self.n_intervals = 1
      if self.series_length < self.min_interval:
          self.min_interval = self.series_length
  
      self.intervals_ = [
          _get_intervals(
              self.n_intervals,
              self.min_interval,
              self.series_length,
              rng,
              self.inner_series_length,
          )
          for _ in range(self.n_estimators)
      ]
  
      self.estimators_ = Parallel(n_jobs=n_jobs)(
          delayed(_fit_estimator)(
              _clone_estimator(self._estimator, rng),
              X,
              y,
              self.intervals_[i],
          )
          for i in range(self.n_estimators)
      )
  
      self._is_fitted = True
      return self
  
file_path: sktime/sktime/series_as_features/base/estimators/interval_based/_tsf.py
imports: import math
  from typing import Optional
  import numpy
  from joblib import Parallel, delayed
  from numpy.random import RandomState
  from sklearn.utils.multiclass import class_distribution
  from sklearn.utils.validation import check_random_state
  from sktime.base._base import _clone_estimator
  from sktime.utils.slope_and_trend import _slope
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 3 for calling the BaseTimeSeriesForest obj's underlying member method code with example usage: obj._fit(X, y) and returns: self