QuestionQ98
VerifiedUsing Spark MLA Data Scientist is creating a machine-learning pipeline to classify raw text with a Logistic Regression model in Spark, using Spark MLlib Pipelines. The pipeline contains three stages: a Tokenizer (to split raw text into tokens), a HashingTF (to convert tokens into hashes), and Logistic Regression itself (to classify the texts). The Spark DataFrame containing training data is named trainingDF, and the one containing test data is named testDF.
To accomplish this, they use the following incomplete code:

Which option correctly identifies:
(i) The full command to train the model;
(ii) The full command to run prediction on the test data;
(iii) The type of the model object returned by the model-training command.
Community Discussion