The data types of all independent variables in linear regression must be numeric.

Prepare for the Data Mining Test with our comprehensive quizzes. Practice with various question types, each with hints and explanations. Boost your understanding and ensure success on your exam!

Multiple Choice

The data types of all independent variables in linear regression must be numeric.

Explanation:
In linear regression, the predicted value is formed as a weighted sum of the predictor values: ŷ = β0 + β1x1 + β2x2 + ... . This math only makes sense if each predictor xj is numeric, so you can multiply it by its coefficient βj and add the results. Non-numeric predictors can’t be used directly in this equation. Categorical variables must be converted into numeric features (for example, via one-hot encoding) before they can be included. Text data likewise needs to be transformed into numeric representations (such as bag-of-words or embeddings) before fitting the model. Boolean values can be represented as 0/1, which are numeric, but the underlying requirement is that the predictors fed into the model are numeric. Therefore, numeric is the appropriate choice.

In linear regression, the predicted value is formed as a weighted sum of the predictor values: ŷ = β0 + β1x1 + β2x2 + ... . This math only makes sense if each predictor xj is numeric, so you can multiply it by its coefficient βj and add the results. Non-numeric predictors can’t be used directly in this equation. Categorical variables must be converted into numeric features (for example, via one-hot encoding) before they can be included. Text data likewise needs to be transformed into numeric representations (such as bag-of-words or embeddings) before fitting the model. Boolean values can be represented as 0/1, which are numeric, but the underlying requirement is that the predictors fed into the model are numeric. Therefore, numeric is the appropriate choice.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy