Why does minimising log loss yield conditional probabilities rather than hard class assignments?

Quick Overview

Asks why minimizing log loss leads a classifier to output conditional class probabilities instead of hard labels. Tests the expected-loss derivation, strictly proper scoring rules, the contrast with 0-1 loss, the likelihood and KL divergence views, and practical calibration caveats.

Why does minimising log loss yield conditional probabilities rather than hard class assignments?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why does minimising log loss yield conditional probabilities rather than hard class assignments? ```hint Fix one input Hold $x$ fixed, let $\eta = P(y = 1 \mid x)$, and write the expected log loss of predicting $p$ as a function of $p$. ``` ```hint Compare with 0-1 loss Work out what 0-1 loss charges for predicting 0.6 compared with 0.99 when the true probability is 0.7, then do the same for log loss. ``` ### What a Strong Answer Covers - The expected log loss at a fixed input, and the derivation that its unique minimizer is the true conditional probability - What a strictly proper scoring rule is, and why 0-1 loss gives no incentive to report probabilities - Why confident wrong predictions make hard outputs a bad choice under uncertainty - The maximum likelihood and KL divergence views of the same result - How hard labels come from a cost-based threshold, and the practical caveats (capacity, finite data, miscalibration) ### Follow-up Questions - Is the Brier score also strictly proper? What about hinge loss, and what does that mean for SVM outputs? - What happens to the predicted probabilities of unregularized logistic regression on linearly separable training data, and why? - A false negative costs nine times as much as a false positive. Which threshold on a calibrated probability minimizes expected cost?

Overview: Asks why minimizing log loss leads a classifier to output conditional class probabilities instead of hard labels. Tests the expected-loss derivation, strictly proper scoring rules, the contrast with 0-1 loss, the likelihood and KL divergence views, and practical calibration caveats.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why does minimising log loss yield conditional probabilities rather than hard class assignments?

What a Strong Answer Covers Guidance

  • The expected log loss at a fixed input, and the derivation that its unique minimizer is the true conditional probability
  • What a strictly proper scoring rule is, and why 0-1 loss gives no incentive to report probabilities
  • Why confident wrong predictions make hard outputs a bad choice under uncertainty
  • The maximum likelihood and KL divergence views of the same result
  • How hard labels come from a cost-based threshold, and the practical caveats (capacity, finite data, miscalibration)

Follow-up Questions Guidance

  • Is the Brier score also strictly proper? What about hinge loss, and what does that mean for SVM outputs?
  • What happens to the predicted probabilities of unregularized logistic regression on linearly separable training data, and why?
  • A false negative costs nine times as much as a false positive. Which threshold on a calibrated probability minimizes expected cost?