Import libraries for gbt classifier
import pyspark from pyspark.ml.classification import GBTClassifier from pyspark.ml.feature import StringIndexer, VectorAssembler from pyspark.sql import SparkSession from pyspark.ml import Pipeline from pyspark.ml.feature import StandardScaler from pyspark.ml.evaluation import BinaryClassificationEvaluator spark = SparkSession.builder.appName("Gradient Boosted Tree Classifier").getOrCreate()