How do you modify a standard loss function when false negatives are ten times more expensive than false positives?

Quick Overview

Asks how to change a binary classifier's training loss or decision rule when a missed positive costs ten times as much as a false alarm. Tests cost-sensitive learning, picking a threshold from error costs, and how class weights affect calibration.

How do you modify a standard loss function when false negatives are ten times more expensive than false positives?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How do you modify a standard loss function when false negatives are ten times more expensive than false positives? You are training a binary classifier with ordinary cross-entropy, and a missed positive costs ten times as much as a false alarm. ```hint Where the cost lands A false negative can only happen on a positive example. Think about how to make mistakes on those examples count more during training. ``` ```hint A second lever Costs can also enter at decision time. For a given predicted probability p, write the expected cost of predicting positive and of predicting negative, and see where they are equal. ``` ### What a Strong Answer Covers - The weighted loss, written out, and which class gets the weight - The decision-threshold alternative and the threshold value implied by the costs - How the two approaches relate, and what goes wrong if you apply both - The effect of weighting on calibration, and how to evaluate the model ### Follow-up Questions - After training with a positive weight of 10, how would you recover calibrated probabilities from the model's outputs? - How does oversampling the positives compare with weighting their loss? - After deployment the cost ratio changes from 10 to 20. Which approach lets you adapt without retraining? - How would you handle the same cost asymmetry in a gradient-boosted tree model?

Overview: Asks how to change a binary classifier's training loss or decision rule when a missed positive costs ten times as much as a false alarm. Tests cost-sensitive learning, picking a threshold from error costs, and how class weights affect calibration.

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

How do you modify a standard loss function when false negatives are ten times more expensive than false positives?

You are training a binary classifier with ordinary cross-entropy, and a missed positive costs ten times as much as a false alarm.

What a Strong Answer Covers Guidance

  • The weighted loss, written out, and which class gets the weight
  • The decision-threshold alternative and the threshold value implied by the costs
  • How the two approaches relate, and what goes wrong if you apply both
  • The effect of weighting on calibration, and how to evaluate the model

Follow-up Questions Guidance

  • After training with a positive weight of 10, how would you recover calibrated probabilities from the model's outputs?
  • How does oversampling the positives compare with weighting their loss?
  • After deployment the cost ratio changes from 10 to 20. Which approach lets you adapt without retraining?
  • How would you handle the same cost asymmetry in a gradient-boosted tree model?