This one went deeper than I expected for a phone screen.
Start by stating that logistic regression uses binary cross-entropy (log loss), then derive it from maximum likelihood estimation assuming a Bernoulli distribution. Explain why MSE is unsuitable for classification due to non-convexity and poor gradient behavior, and optionally extend to multi-class with categorical cross-entropy.
Pro tip: Emphasize that cross-entropy is convex for logistic regression, ensuring reliable optimization, and mention that it penalizes confident wrong predictions heavily, which is crucial for classification.
Clearly identify binary cross-entropy as the loss function used in logistic regression.
Present the binary cross-entropy formula: L(y, p) = -[y log(p) + (1-y) log(1-p)].
Assume labels are Bernoulli distributed with probability p = sigmoid(w·x + b). Write the likelihood, take the negative log, and show it equals the cross-entropy loss.
Explain that MSE leads to a non-convex loss surface for logistic regression, causing optimization issues, and that cross-entropy provides stronger gradients for misclassified points.
Generalize to categorical cross-entropy: L = -Σ y_i log(p_i), where p_i = softmax output, derived from multinomial likelihood.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.