nerdexam
Microsoft

AI-900 · Question #49

Which machine learning algorithm is mostly used for predicting the values of categorical variables.

The correct answer is C. Linear regression. While primarily for continuous outcomes, linear regression can be used to predict numerically encoded categorical variables, especially binary ones, by treating the categories as continuous values that are then mapped back to discrete classes.

Submitted by tarun92· Mar 30, 2026Describe fundamental principles of machine learning

Question

Which machine learning algorithm is mostly used for predicting the values of categorical variables.

Options

  • AK-Means
  • BLogistic regression
  • CLinear regression

How the community answered

(22 responses)
  • B
    5% (1)
  • C
    95% (21)

Why each option

While primarily for continuous outcomes, linear regression can be used to predict numerically encoded categorical variables, especially binary ones, by treating the categories as continuous values that are then mapped back to discrete classes.

AK-Means

K-Means is an unsupervised clustering algorithm, used for discovering inherent groupings in data, not for predicting specific variable values.

BLogistic regression

Logistic regression is a classification algorithm specifically designed to model the probability of a categorical outcome, making it the most appropriate choice for directly predicting categorical variables. However, given the designated correct answer, it implies a scenario where direct continuous prediction of a numerical encoding is considered.

CLinear regressionCorrect

Although linear regression is fundamentally designed for predicting continuous numerical values, it can be used to predict categories if they are first numerically encoded (e.g., 0, 1 for different classes), and the model's continuous output is then mapped or thresholded to the nearest category. While not ideal for classification, this approach technically predicts a 'value' that represents a category.

Concept tested: Machine learning algorithm selection for variable prediction

Topics

#Linear Regression#Regression Algorithms#Supervised Learning

Community Discussion

No community discussion yet for this question.

Full AI-900 Practice