What data type should the target attribute in linear regression be?

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

What data type should the target attribute in linear regression be?

Explanation:
Linear regression is built to predict a continuous numeric outcome. The model finds coefficients that minimize the sum of squared differences between the predicted value and the actual target value, which relies on numeric arithmetic and a linear relationship between features and the target. If the target were categorical, the concept of a numeric residual wouldn’t fit, and you’d use a classification approach (for example, logistic regression for binary outcomes). A boolean target could be encoded as 0/1, but predictions might fall outside the 0–1 range and interpretation becomes awkward, so classification is typically more appropriate. Text targets can’t be directly predicted with linear regression since the model outputs numbers, not words, and you’d need a different modeling approach or convert the text to numeric representations for another task. So, the target should be numeric to fit linear regression.

Linear regression is built to predict a continuous numeric outcome. The model finds coefficients that minimize the sum of squared differences between the predicted value and the actual target value, which relies on numeric arithmetic and a linear relationship between features and the target. If the target were categorical, the concept of a numeric residual wouldn’t fit, and you’d use a classification approach (for example, logistic regression for binary outcomes). A boolean target could be encoded as 0/1, but predictions might fall outside the 0–1 range and interpretation becomes awkward, so classification is typically more appropriate. Text targets can’t be directly predicted with linear regression since the model outputs numbers, not words, and you’d need a different modeling approach or convert the text to numeric representations for another task. So, the target should be numeric to fit linear regression.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy