
Answer-first summary for fast verification
Answer: Logistic regression, as it is specifically designed for binary classification tasks and provides a probabilistic interpretation of the predictions.
In a Spark MLlib implementation for a binary classification task, logistic regression would be the most suitable algorithm. Logistic regression is specifically designed for binary classification tasks, where the target variable is categorical with two classes. It models the probability of the target variable being in one of the classes and provides a probabilistic interpretation of the predictions. While linear regression, decision trees, and random forests can also be used for classification tasks, logistic regression is more appropriate for binary classification, as it directly models the probability of the target variable being in a particular class.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In a Spark MLlib implementation, you are working with a large dataset and need to build a model for a binary classification task. Which of the following algorithms would be most suitable for this task, and why?
A
Linear regression, as it can be used for both regression and classification tasks.
B
Decision trees, as they can handle non-linear relationships and complex interactions between features.
C
Logistic regression, as it is specifically designed for binary classification tasks and provides a probabilistic interpretation of the predictions.
D
Random forests, as they are an ensemble method that combines multiple decision trees to improve accuracy and robustness.