code: def main():
      print("-- Gradient Boosting Classification --")
  
      data = datasets.load_iris()
      X = data.data
      y = data.target
  
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, test_size=0.4
      )
  
      clf = GradientBoostingClassifier()
      clf.fit(X_train, y_train)
      y_pred = clf.predict(X_test)
  
      accuracy = accuracy_score(y_test, y_pred)
  
      print("Accuracy:", accuracy)
  
      Plot().plot_in_2d(
          X_test,
          y_pred,
          title="Gradient Boosting",
          accuracy=accuracy,
          legend_labels=data.target_names,
      )
  
file_path: ML-From-Scratch/mlfromscratch/examples/gradient_boosting_classifier.py
imports: from __future__ import division, print_function
  import numpy
  from sklearn import datasets
  import matplotlib.pyplot
  from mlfromscratch.utils import train_test_split, accuracy_score
  from mlfromscratch.deep_learning.loss_functions import CrossEntropy
  from mlfromscratch.utils import Plot
  from mlfromscratch.supervised_learning import GradientBoostingClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types