The stage is now set to apply the model to the dataframe.
Applying the logistic regression model
Getting ready
This section will focus on applying a very common classification model called logistic regression, which will involve importing some of the following from Spark:
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.evaluation import BinaryClassificationEvaluator
from pyspark.ml.classification import LogisticRegression
How to do it...
This section will walk through the steps of applying our model and evaluating the results.
- Execute the following script...