How does the class_weight='balanced' option work in logistic regression, and what problem does it solve?
Role: Data Scientist
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks how the balanced class weight setting changes logistic regression training on imbalanced data and why you would use it. Tests the weight formula, its effect on the decision threshold, recall and precision, and what it does to the meaning of predicted probabilities.