class_docstr: Time series forest classifier.
  
  A time series forest is an ensemble of decision trees built on random intervals.
  Overview: Input n series length m.
  For each tree
      - sample sqrt(m) intervals,
      - find mean, std and slope for each interval, concatenate to form new
      data set, if inner series length is set, then intervals are sampled
      within bins of length inner_series_length.
      - build decision tree on new data set.
  Ensemble the trees with averaged probability estimates.
  
  This implementation deviates from the original in minor ways. It samples
  intervals with replacement and does not use the splitting criteria tiny
  refinement described in [1].
  
  This is an intentionally stripped down, non
  configurable version for use as a hive-cote component. For a configurable
  tree based ensemble, see sktime.classifiers.ensemble.TimeSeriesForestClassifier
  
  Parameters
  ----------
  n_estimators : int, default=200
      Number of estimators to build for the ensemble.
  min_interval : int, default=3
      Minimum length of an interval.
  n_jobs : int, default=1
      The number of jobs to run in parallel for both `fit` and `predict`.
      ``-1`` means using all processors.
  inner_series_length: int, default=None
      The maximum length of unique segments within X from which we extract
      intervals is determined. This helps prevent the extraction of
      intervals that span across distinct inner series.
  random_state : int or None, default=None
      Seed for random number generation.
  
  Attributes
  ----------
  n_classes_ : int
      The number of classes.
  classes_ : list
      The classes labels.
  feature_importances_ : pandas Dataframe of shape (series_length, 3)
      The feature temporal importances for each feature type (mean, std, slope).
      It shows how much each time point of your input dataset, through the
      feature types extracted (mean, std, slope), contributed to the predictions.
  
  Notes
  -----
  For the Java version, see
  `TSML <https://github.com/uea-machine-learning/tsml/blob/master/src/main/
   java/tsml/classifiers/interval_based/TSF.java>`_.
  
  References
  ----------
  .. [1] H.Deng, G.Runger, E.Tuv and M.Vladimir, "A time series forest for
     classification and feature extraction",Information Sciences, 239, 2013
  
  Examples
  --------
  >>> from sktime.classification.interval_based import TimeSeriesForestClassifier
  >>> from sktime.datasets import load_unit_test
  >>> X_train, y_train = load_unit_test(split="train", return_X_y=True)
  >>> X_test, y_test = load_unit_test(split="test", return_X_y=True)
  >>> clf = TimeSeriesForestClassifier(n_estimators=5)
  >>> clf.fit(X_train, y_train)
  TimeSeriesForestClassifier(n_estimators=5)
  >>> y_pred = clf.predict(X_test)
class_docstr_tok: ["Time","series","forest","classifier",".","A","time","series","forest","is","an","ensemble","of","decision","trees","built","on","random","intervals",".","Overview",":","Input","n","series","length","m.","For","each","tree","-","sample","sqrt","(","m",")","intervals",",","-","find","mean",",","std","and","slope","for","each","interval",",","concatenate","to","form","new","data","set",",","if","inner","series","length","is","set",",","then","intervals","are","sampled","within","bins","of","length","inner_series_length",".","-","build","decision","tree","on","new","data","set",".","Ensemble","the","trees","with","averaged","probability","estimates",".","This","implementation","deviates","from","the","original","in","minor","ways",".","It","samples","intervals","with","replacement","and","does","not","use","the","splitting","criteria","tiny","refinement","described","in","[","1","]",".","This","is","an","intentionally","stripped","down",",","non","configurable","version","for","use","as","a","hive-cote","component",".","For","a","configurable","tree","based","ensemble",",","see","sktime.classifiers.ensemble.TimeSeriesForestClassifier","Parameters","--","--","--","--","--","n_estimators",":","int",",","default=200","Number","of","estimators","to","build","for","the","ensemble",".","min_interval",":","int",",","default=3","Minimum","length","of","an","interval",".","n_jobs",":","int",",","default=1","The","number","of","jobs","to","run","in","parallel","for","both","`","fit","`","and","`","predict","`",".","``","-1","``","means","using","all","processors",".","inner_series_length",":","int",",","default=None","The","maximum","length","of","unique","segments","within","X","from","which","we","extract","intervals","is","determined",".","This","helps","prevent","the","extraction","of","intervals","that","span","across","distinct","inner","series",".","random_state",":","int","or","None",",","default=None","Seed","for","random","number","generation",".","Attributes","--","--","--","--","--","n_classes_",":","int","The","number","of","classes",".","classes_",":","list","The","classes","labels",".","feature_importances_",":","pandas","Dataframe","of","shape","(","series_length",",","3",")","The","feature","temporal","importances","for","each","feature","type","(","mean",",","std",",","slope",")",".","It","shows","how","much","each","time","point","of","your","input","dataset",",","through","the","feature","types","extracted","(","mean",",","std",",","slope",")",",","contributed","to","the","predictions",".","Notes","--","--","-","For","the","Java","version",",","see","`","TSML","<","https",":","\/\/github.com\/uea-machine-learning\/tsml\/blob\/master\/src\/main\/","java\/tsml\/classifiers\/interval_based\/TSF.java",">","`","_",".","References","--","--","--","--","--","..","[","1","]","H.Deng",",","G.Runger",",","E.Tuv","and","M.Vladimir",",","``","A","time","series","forest","for","classification","and","feature","extraction","''",",","Information","Sciences",",","239",",","2013","Examples","--","--","--","--",">",">",">","from","sktime.classification.interval_based","import","TimeSeriesForestClassifier",">",">",">","from","sktime.datasets","import","load_unit_test",">",">",">","X_train",",","y_train","=","load_unit_test","(","split=","''","train","''",",","return_X_y=True",")",">",">",">","X_test",",","y_test","=","load_unit_test","(","split=","''","test","''",",","return_X_y=True",")",">",">",">","clf","=","TimeSeriesForestClassifier","(","n_estimators=5",")",">",">",">","clf.fit","(","X_train",",","y_train",")","TimeSeriesForestClassifier","(","n_estimators=5",")",">",">",">","y_pred","=","clf.predict","(","X_test",")"]
docstr: Wrap fit to call BaseClassifier.fit.
  
  This is a fix to get around the problem with multiple inheritance. The problem
  is that if we just override _fit, this class inherits the fit from the sklearn
  class BaseTimeSeriesForest. This is the simplest solution, albeit a little
  hacky.
docstr_tok: ["Wrap","fit","to","call","BaseClassifier.fit",".","This","is","a","fix","to","get","around","the","problem","with","multiple","inheritance",".","The","problem","is","that","if","we","just","override","_fit",",","this","class","inherits","the","fit","from","the","sklearn","class","BaseTimeSeriesForest",".","This","is","the","simplest","solution",",","albeit","a","little","hacky","."]
code: def fit(self, X, y, **kwargs):
      """Wrap fit to call BaseClassifier.fit.
  
      This is a fix to get around the problem with multiple inheritance. The problem
      is that if we just override _fit, this class inherits the fit from the sklearn
      class BaseTimeSeriesForest. This is the simplest solution, albeit a little
      hacky.
      """
      return BaseClassifier.fit(self, X=X, y=y, **kwargs)
  
imports: from typing import Optional
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn.ensemble._forest import ForestClassifier
  from sklearn.tree import DecisionTreeClassifier
  from sktime.classification.base import BaseClassifier
  from sktime.series_as_features.base.estimators.interval_based import BaseTimeSeriesForest
  from sktime.series_as_features.base.estimators.interval_based._tsf import _transform
label_desc: Use image node_id 2 for calling the TimeSeriesForestClassifier obj's underlying member method code with example usage: obj.fit(X, y) and returns: BaseClassifier