The data types of all independent variables in logistic 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 logistic regression must be numeric.

Explanation:
Logistic regression builds its prediction as a weighted sum of the input features, then applies a logistic function to map that sum to a probability. To form that weighted sum, each independent variable must be numeric so it can be multiplied by its coefficient and added together. If a variable is categorical or text, it can’t be used directly in this math; you must first convert it to numeric form (for categories, through dummy/one-hot encoding; for text, via vectorization). Binary values already come as 0/1, so they are numeric and fit directly. That’s why numeric is the correct requirement.

Logistic regression builds its prediction as a weighted sum of the input features, then applies a logistic function to map that sum to a probability. To form that weighted sum, each independent variable must be numeric so it can be multiplied by its coefficient and added together. If a variable is categorical or text, it can’t be used directly in this math; you must first convert it to numeric form (for categories, through dummy/one-hot encoding; for text, via vectorization). Binary values already come as 0/1, so they are numeric and fit directly. That’s why numeric is the correct requirement.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy