How do class prior probabilities shift the Bayes-optimal decision rule?

Quick Overview

Explain how class prior probabilities enter the Bayes-optimal classifier and move its decision boundary. Tests the likelihood-ratio and log-odds forms of the rule, cost-weighted thresholds, and how to correct a model's probabilities when training and deployment class mixes differ.

How do class prior probabilities shift the Bayes-optimal decision rule?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How do class prior probabilities shift the Bayes-optimal decision rule? Explain where the priors enter the rule, what they do to the decision boundary, and what this means for a classifier that is trained on one class mix and deployed on another. ```hint Start from Bayes' rule Write the posterior as likelihood times prior and ask which of the two factors depends on $x$. ``` ```hint Take logs In the binary case, write out the log posterior odds and see where the prior term ends up. ``` ### What a Strong Answer Covers - The Bayes-optimal rule under 0-1 loss and exactly where the prior enters it - The binary likelihood-ratio test and its log-odds form, including how unequal error costs change the threshold - How the decision boundary moves when a prior changes, for example in LDA - How to adjust a trained model's outputs when deployment priors differ from training priors, and the assumption that adjustment relies on - What happens to the rule under extreme class imbalance ### Follow-up Questions - You trained on a 50/50 downsampled dataset and production has a 1% positive rate. How do you recover calibrated probabilities? - How would you estimate the deployment class priors when production labels are not available? - When does the prior-shift correction fail, for example when $p(x \mid y)$ also changes between training and deployment? - How do asymmetric misclassification costs combine with the priors in the decision threshold?

Overview: Explain how class prior probabilities enter the Bayes-optimal classifier and move its decision boundary. Tests the likelihood-ratio and log-odds forms of the rule, cost-weighted thresholds, and how to correct a model's probabilities when training and deployment class mixes differ.

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

How do class prior probabilities shift the Bayes-optimal decision rule?

Explain where the priors enter the rule, what they do to the decision boundary, and what this means for a classifier that is trained on one class mix and deployed on another.

What a Strong Answer Covers Guidance

  • The Bayes-optimal rule under 0-1 loss and exactly where the prior enters it
  • The binary likelihood-ratio test and its log-odds form, including how unequal error costs change the threshold
  • How the decision boundary moves when a prior changes, for example in LDA
  • How to adjust a trained model's outputs when deployment priors differ from training priors, and the assumption that adjustment relies on
  • What happens to the rule under extreme class imbalance

Follow-up Questions Guidance

  • You trained on a 50/50 downsampled dataset and production has a 1% positive rate. How do you recover calibrated probabilities?
  • How would you estimate the deployment class priors when production labels are not available?
  • When does the prior-shift correction fail, for example when p(x∣y)p(x \mid y) also changes between training and deployment?
  • How do asymmetric misclassification costs combine with the priors in the decision threshold?