docs: def fit(self, X, y, cost_mat, check_input=False):
          """ Build a example-dependent cost-sensitive decision tree from the training set (X, y, cost_mat)
  
          Parameters
          ----------
          y_true : array indicator matrix
              Ground truth (correct) labels.
  
          X : array-like of shape = [n_samples, n_features]
              The input samples.
  
          cost_mat : array-like of shape = [n_samples, 4]
              Cost matrix of the classification problem
              Where the columns represents the costs of: false positives, false negatives,
              true positives and true negatives, for each example.
  
          check_input : boolean, (default=True)
              Allow to bypass several input checking.
              Don't use this parameter unless you know what you do.
  
  
          Returns
          -------
          self : object
              Returns self.
          """
  
          #TODO: Check input
          #TODO: Add random state
          n_samples, self.n_features_ = X.shape
  
          self.tree_ = self._tree_class()
  
          # Maximum number of features to be taken into account per split
          if isinstance(self.max_features, six.string_types):
              if self.max_features == "auto":
                  max_features = max(1, int(np.sqrt(self.n_features_)))
              elif self.max_features == "sqrt":
                  max_features = max(1, int(np.sqrt(self.n_features_)))
              elif self.max_features == "log2":
                  max_features = max(1, int(np.log2(self.n_features_)))
              else:
                  raise ValueError(
                      'Invalid value for max_features. Allowed string '
                      'values are "auto", "sqrt" or "log2".')
          elif self.max_features is None:
              max_features = self.n_features_
          elif isinstance(self.max_features, (numbers.Integral, np.integer)):
              max_features = self.max_features
          else:  # float
              if self.max_features > 0.0:
                  max_features = max(1, int(self.max_features * self.n_features_))
              else:
                  max_features = 1  # On sklearn is 0.
          self.max_features_ = max_features
  
          self.tree_.tree = self._tree_grow(y, X, cost_mat)
  
          if self.pruned:
              self.pruning(X, y, cost_mat)
  
          self.classes_ = np.array([0, 1])
  
          return self