[doc] Variable 'label' is not defined in the pyspark application example (#9302)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user