class_docstr: Super class of RegressionTree and ClassificationTree.
  
  Parameters:
  -----------
  min_samples_split: int
      The minimum number of samples needed to make a split when building a tree.
  min_impurity: float
      The minimum impurity required to split the tree further.
  max_depth: int
      The maximum depth of a tree.
  loss: function
      Loss function that is used for Gradient Boosting models to calculate impurity.
class_docstr_tok: ["Super","class","of","RegressionTree","and","ClassificationTree",".","Parameters",":","--","--","--","--","--","-","min_samples_split",":","int","The","minimum","number","of","samples","needed","to","make","a","split","when","building","a","tree",".","min_impurity",":","float","The","minimum","impurity","required","to","split","the","tree","further",".","max_depth",":","int","The","maximum","depth","of","a","tree",".","loss",":","function","Loss","function","that","is","used","for","Gradient","Boosting","models","to","calculate","impurity","."]
code: def __init__(
      self,
      min_samples_split=2,
      min_impurity=1e-7,
      max_depth=float("inf"),
      loss=None,
  ):
      self.root = None  # Root node in dec. tree
      # Minimum n of samples to justify split
      self.min_samples_split = min_samples_split
      # The minimum impurity to justify split
      self.min_impurity = min_impurity
      # The maximum depth to grow the tree to
      self.max_depth = max_depth
      # Function to calculate impurity (classif.=>info gain, regr=>variance reduct.)
      self._impurity_calculation = None
      # Function to determine prediction of y at leaf
      self._leaf_value_calculation = None
      # If y is one-hot encoded (multi-dim) or not (one-dim)
      self.one_dim = None
      # If Gradient Boost
      self.loss = loss
  
imports: from __future__ import division, print_function
  import numpy
  from mlfromscratch.utils import divide_on_feature, train_test_split, standardize, mean_squared_error
  from mlfromscratch.utils import calculate_entropy, accuracy_score, calculate_variance
label_desc: Use image node_id 1 to create a new DecisionTree object from inherited base classes: object with example: obj = DecisionTree(min_samples_split, min_impurity, max_depth, loss)