[doc] Variable 'label' is not defined in the pyspark application example (#9302)
This commit is contained in:
parent
0df1272695
commit
2718ff530c
@ -146,7 +146,7 @@ using a list of feature names and the additional parameter ``use_gpu``:
|
|||||||
label_name = "class"
|
label_name = "class"
|
||||||
|
|
||||||
# get a list with feature column names
|
# 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
|
# create a xgboost pyspark regressor estimator and set use_gpu=True
|
||||||
regressor = SparkXGBRegressor(
|
regressor = SparkXGBRegressor(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user