How does modifying the class prior probabilities shift the effective decision threshold of a Naive Bayes classifier?

Quick Overview

Asks how changing the class priors of a Naive Bayes classifier moves its decision threshold. Tests the log-likelihood ratio form of the decision rule, how priors relate to thresholds on the posterior, and what a prior change does to evaluation metrics in the binary and multiclass cases.

How does modifying the class prior probabilities shift the effective decision threshold of a Naive Bayes classifier?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does modifying the class prior probabilities shift the effective decision threshold of a Naive Bayes classifier? ```hint Work in log space Write the two-class decision rule as a comparison of log posteriors and separate the term that depends on the features from the term that depends only on the priors. ``` ### What a Strong Answer Covers - Where the prior enters the Naive Bayes score and what part of the computation it leaves untouched. - The binary decision rule written as a log-likelihood ratio compared with a prior-dependent threshold, and the direction the threshold moves. - How a prior change relates to choosing a different threshold on the original model's posterior. - What happens to decision regions in the multiclass case. - What a prior change does and does not affect in evaluation metrics. ### Follow-up Questions - The model was trained on a class-balanced sample but production has a 1% positive rate. How would you correct its posteriors? - In the multiclass case, can changing the priors change how examples rank for a single class? - How does a prior change in Naive Bayes compare with changing the intercept of a logistic regression?

Overview: Asks how changing the class priors of a Naive Bayes classifier moves its decision threshold. Tests the log-likelihood ratio form of the decision rule, how priors relate to thresholds on the posterior, and what a prior change does to evaluation metrics in the binary and multiclass cases.

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

How does modifying the class prior probabilities shift the effective decision threshold of a Naive Bayes classifier?

What a Strong Answer Covers Guidance

  • Where the prior enters the Naive Bayes score and what part of the computation it leaves untouched.
  • The binary decision rule written as a log-likelihood ratio compared with a prior-dependent threshold, and the direction the threshold moves.
  • How a prior change relates to choosing a different threshold on the original model's posterior.
  • What happens to decision regions in the multiclass case.
  • What a prior change does and does not affect in evaluation metrics.

Follow-up Questions Guidance

  • The model was trained on a class-balanced sample but production has a 1% positive rate. How would you correct its posteriors?
  • In the multiclass case, can changing the priors change how examples rank for a single class?
  • How does a prior change in Naive Bayes compare with changing the intercept of a logistic regression?