class_docstr: Super class of GradientBoostingClassifier and GradientBoostinRegressor. 
  Uses a collection of regression trees that trains on predicting the gradient
  of the loss function. 
  
  Parameters:
  -----------
  n_estimators: int
      The number of classification trees that are used.
  learning_rate: float
      The step length that will be taken when following the negative gradient during
      training.
  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.
  regression: boolean
      True or false depending on if we're doing regression or classification.
class_docstr_tok: ["Super","class","of","GradientBoostingClassifier","and","GradientBoostinRegressor",".","Uses","a","collection","of","regression","trees","that","trains","on","predicting","the","gradient","of","the","loss","function",".","Parameters",":","--","--","--","--","--","-","n_estimators",":","int","The","number","of","classification","trees","that","are","used",".","learning_rate",":","float","The","step","length","that","will","be","taken","when","following","the","negative","gradient","during","training",".","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",".","regression",":","boolean","True","or","false","depending","on","if","we","'re","doing","regression","or","classification","."]
code: def predict(self, X):
      y_pred = np.array([])
      # Make predictions
      for tree in self.trees:
          update = tree.predict(X)
          update = np.multiply(self.learning_rate, update)
          y_pred = -update if not y_pred.any() else y_pred - update
  
      if not self.regression:
          # Turn into probability distribution
          y_pred = np.exp(y_pred) / np.expand_dims(
              np.sum(np.exp(y_pred), axis=1), axis=1
          )
          # Set label to the value that maximizes probability
          y_pred = np.argmax(y_pred, axis=1)
      return y_pred
  
file_path: ML-From-Scratch/mlfromscratch/supervised_learning/gradient_boosting.py
imports: from __future__ import division, print_function
  import numpy
  import progressbar
  from mlfromscratch.utils import train_test_split, standardize, to_categorical
  from mlfromscratch.utils import mean_squared_error, accuracy_score
  from mlfromscratch.deep_learning.loss_functions import SquareLoss, CrossEntropy
  from mlfromscratch.supervised_learning.decision_tree import RegressionTree
  from mlfromscratch.utils.misc import bar_widgets
label_desc: Use image node_id 3 for calling the GradientBoosting obj's underlying member method code with example usage: obj.predict(X) and returns: y_pred