When would you prefer an asymmetric business cost matrix over frequency-based inverse class weights?

Quick Overview

Asks when a classifier on imbalanced data should use an explicit business cost matrix instead of class weights based on inverse label frequency. Tests cost-sensitive learning, decision thresholds from calibrated probabilities, and how misclassification costs differ from class rarity.

When would you prefer an asymmetric business cost matrix over frequency-based inverse class weights?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

When would you prefer an asymmetric business cost matrix over frequency-based inverse class weights? ```hint What each one encodes One scheme is computed from label counts, the other from the consequences of each kind of error. Think of cases where those two quantities disagree. ``` ```hint Where the costs enter Costs can be baked into training, or applied to the model's probabilities when the decision is made. Consider what each option does to calibration and to changing costs later. ``` ### What a Strong Answer Covers - What inverse-frequency weights encode compared with a cost matrix - Situations where cost and rarity diverge, including pair-specific multiclass costs and example-dependent costs - When inverse-frequency weighting is an acceptable choice - How to turn costs into a decision rule, and why calibrated probabilities matter for it - The trade-off between putting costs into training and applying them at decision time ### Follow-up Questions - Derive the decision threshold when correct decisions also cost something, such as a review fee on every flagged transaction. - How would you set the decision rule when the cost of a miss is the transaction amount? - Costs are uncertain and stakeholders disagree on them. How would you choose and report a threshold? - How does training with class weights affect probability calibration, and how would you correct it?

Overview: Asks when a classifier on imbalanced data should use an explicit business cost matrix instead of class weights based on inverse label frequency. Tests cost-sensitive learning, decision thresholds from calibrated probabilities, and how misclassification costs differ from class rarity.

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

When would you prefer an asymmetric business cost matrix over frequency-based inverse class weights?

What a Strong Answer Covers Guidance

  • What inverse-frequency weights encode compared with a cost matrix
  • Situations where cost and rarity diverge, including pair-specific multiclass costs and example-dependent costs
  • When inverse-frequency weighting is an acceptable choice
  • How to turn costs into a decision rule, and why calibrated probabilities matter for it
  • The trade-off between putting costs into training and applying them at decision time

Follow-up Questions Guidance

  • Derive the decision threshold when correct decisions also cost something, such as a review fee on every flagged transaction.
  • How would you set the decision rule when the cost of a miss is the transaction amount?
  • Costs are uncertain and stakeholders disagree on them. How would you choose and report a threshold?
  • How does training with class weights affect probability calibration, and how would you correct it?