Databricks Machine Learning Associate Question 548
Single answerYou are tasked with building a machine learning model to classify customer reviews as 'positive' or 'negative' based on the text of the review. The dataset contains a large number of labeled text samples, and you expect the model to handle unseen vocabulary effectively. Which algorithm would be the most appropriate for this scenario?
- A
Linear Regression
- B
K-Means Clustering
- C
Logistic Regression
- D
Support Vector Machines (SVM)
Show answer and explanation
Correct answer: C
Explanation
Logistic Regression is the most appropriate algorithm for this binary classification task. It is designed for supervised classification problems and performs well with structured data, including transformed textual data. Other options, such as Linear Regression and K-Means Clustering, are not suitable as they are not designed for classification tasks, and while SVM can be used, it is less ideal for handling large datasets and text data compared to Logistic Regression.
- A. Incorrect.
Linear Regression is used for regression problems where the target variable is continuous, not for binary classification tasks like this one.
- B. Incorrect.
K-Means Clustering is an unsupervised learning algorithm used for clustering, not for supervised binary classification tasks.
- C. Correct.
Logistic Regression is a suitable choice for binary classification tasks and works well with large datasets. It can also handle textual data effectively when combined with feature engineering techniques like TF-IDF or word embeddings.
- D. Incorrect.
Support Vector Machines (SVM) can be used for binary classification, but they are less effective when dealing with large datasets and high-dimensional data like text, as they are computationally expensive.