[doc] Variable 'label' is not defined in the pyspark application example (#9302)

This commit is contained in:
George Othon
2023-06-15 18:06:52 -03:00
committed by GitHub
parent 0df1272695
commit 2718ff530c

View File

@@ -146,7 +146,7 @@ using a list of feature names and the additional parameter ``use_gpu``:
label_name = "class"
# get a list with feature column names
feature_names = [x.name for x in train_df.schema if x.name != label]
feature_names = [x.name for x in train_df.schema if x.name != label_name]
# create a xgboost pyspark regressor estimator and set use_gpu=True
regressor = SparkXGBRegressor(