class_docstr: Continuous interval tree (CIT) vector classifier (aka Time Series Tree).
  
  The `Time Series Tree` described in the Time Series Forest (TSF) paper Deng et al
  (2013) [1]. A simple information gain based tree for continuous attributes using a
  bespoke margin gain metric for tie breaking.
  
  Implemented as a bade classifier for interval based time series classifiers such as
  `CanonicalIntervalForest` and `DrCIF`.
  
  Parameters
  ----------
  max_depth : int, default=sys.maxsize
      Maximum depth for the tree.
  thresholds : int, default=20
      Number of thresholds to split continuous attributes on at tree nodes.
  random_state : int, RandomState instance or None, default=None
      If `int`, random_state is the seed used by the random number generator;
      If `RandomState` instance, random_state is the random number generator;
      If `None`, the random number generator is the `RandomState` instance used
      by `np.random`.
  
  Attributes
  ----------
  classes_ : list
      The unique class labels in the training set.
  n_classes_ : int
      The number of unique classes in the training set.
  n_instances_ : int
      The number of train cases in the training set.
  n_atts_ : int
      The number of attributes in the training set.
  
  See Also
  --------
  CanonicalIntervalForest
  DrCIF
  
  Notes
  -----
  For the Java version, see
  `tsml <https://github.com/uea-machine-learning/tsml/blob/master/src/main/java/
  machine_learning/classifiers/ContinuousIntervalTree.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.sklearn import ContinuousIntervalTree
  >>> from sktime.datasets import load_unit_test
  >>> from sktime.datatypes._panel._convert import from_nested_to_3d_numpy
  >>> 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)
  >>> X_train = from_nested_to_3d_numpy(X_train)
  >>> X_test = from_nested_to_3d_numpy(X_test)
  >>> clf = ContinuousIntervalTree()
  >>> clf.fit(X_train, y_train)
  ContinuousIntervalTree(...)
  >>> y_pred = clf.predict(X_test)
docstr: Fit a tree on cases (X,y), where y is the target variable.
  
  Build an information gain based tree for continuous attributes using the
  margin gain metric for ties.
  
  Parameters
  ----------
  X : 2d ndarray or DataFrame of shape = [n_instances, n_attributes]
      The training data.
  y : array-like, shape = [n_instances]
      The class labels.
  
  Returns
  -------
  self :
      Reference to self.
  
  Notes
  -----
  Changes state by creating a fitted model that updates attributes
  ending in "_".
docstr_tok: ["Fit","a","tree","on","cases","(","X",",","y",")",",","where","y","is","the","target","variable",".","Build","an","information","gain","based","tree","for","continuous","attributes","using","the","margin","gain","metric","for","ties",".","Parameters","--","--","--","--","--","X",":","2d","ndarray","or","DataFrame","of","shape","=","[","n_instances",",","n_attributes","]","The","training","data",".","y",":","array-like",",","shape","=","[","n_instances","]","The","class","labels",".","Returns","--","--","--","-","self",":","Reference","to","self",".","Notes","--","--","-","Changes","state","by","creating","a","fitted","model","that","updates","attributes","ending","in","``","_","''","."]
code: def fit(self, X, y):
      """Fit a tree on cases (X,y), where y is the target variable.
  
      Build an information gain based tree for continuous attributes using the
      margin gain metric for ties.
  
      Parameters
      ----------
      X : 2d ndarray or DataFrame of shape = [n_instances, n_attributes]
          The training data.
      y : array-like, shape = [n_instances]
          The class labels.
  
      Returns
      -------
      self :
          Reference to self.
  
      Notes
      -----
      Changes state by creating a fitted model that updates attributes
      ending in "_".
      """
      from sktime.classification.sklearn._continuous_interval_tree_numba import (
          _entropy,
      )
  
      if (
          isinstance(X, np.ndarray)
          and len(X.shape) == 3
          and X.shape[1] == 1
      ):
          X = np.reshape(X, (X.shape[0], -1))
      elif not isinstance(X, np.ndarray) or len(X.shape) > 2:
          raise ValueError(
              "ContinuousIntervalTree is not a time series classifier. "
              "A valid sklearn input such as a 2d numpy array is required."
              "Sparse input formats are currently not supported."
          )
      X, y = self._validate_data(
          X=X, y=y, ensure_min_samples=2, force_all_finite="allow-nan"
      )
  
      self.n_instances_, self.n_atts_ = X.shape
      self.classes_ = np.unique(y)
      self.n_classes_ = self.classes_.shape[0]
      self._class_dictionary = {}
      for index, classVal in enumerate(self.classes_):
          self._class_dictionary[classVal] = index
  
      # escape if only one class seen
      if self.n_classes_ == 1:
          self._is_fitted = True
          return self
  
      le = preprocessing.LabelEncoder()
      y = le.fit_transform(y)
  
      rng = check_random_state(self.random_state)
      self._root = _TreeNode(random_state=rng)
  
      thresholds = np.linspace(
          np.min(X, axis=0), np.max(X, axis=0), self.thresholds
      )
  
      distribution = np.zeros(self.n_classes_)
      for i in range(len(y)):
          distribution[y[i]] += 1
  
      entropy = _entropy(distribution, distribution.sum())
  
      self._root.build_tree(
          X,
          y,
          thresholds,
          entropy,
          distribution,
          0,
          self.max_depth,
          self.n_classes_,
          False,
      )
  
      self._is_fitted = True
      return self
  
imports: import sys
  import numpy
  from sklearn import preprocessing
  from sklearn.base import BaseEstimator
  from sklearn.utils import check_random_state
  from sktime.exceptions import NotFittedError
label_desc: Use image node_id 2 for calling the ContinuousIntervalTree obj's underlying member method code with example usage: obj.fit(X, y) and returns: self, self