Under what conditions does Gaussian Naive Bayes produce a quadratic rather than a linear decision boundary?

Quick Overview

Asks when Gaussian Naive Bayes draws a quadratic decision boundary and when it draws a linear one. Tests whether you can derive the log-odds of a generative classifier and relate Gaussian Naive Bayes to LDA and QDA.

Under what conditions does Gaussian Naive Bayes produce a quadratic rather than a linear decision boundary?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Under what conditions does Gaussian Naive Bayes produce a quadratic rather than a linear decision boundary? ```hint Write out the log-odds Expand the log of each class-conditional Gaussian for a single feature, subtract the two classes, and track the coefficient of each power of $x_j$. ``` ```hint Use the covariance structure Ask which terms can appear at all, given that the model treats features as independent within each class. ``` ### What a Strong Answer Covers - The per-feature Gaussian log-likelihood and the log-odds between two classes - The condition under which the squared terms cancel, and what is left when they do - The shape of the boundary when they do not cancel, including why there are no cross terms - How Gaussian Naive Bayes relates to LDA and QDA, and what a standard implementation such as scikit-learn's `GaussianNB` does by default ### Follow-up Questions - In one dimension, with equal class means and different variances, what does each class's decision region look like? - How would you change Gaussian Naive Bayes so its boundary is always linear, and when might that generalize better? - Is Gaussian Naive Bayes with tied variances the same model as logistic regression? What differs? - Why are multinomial and Bernoulli Naive Bayes linear classifiers?

Overview: Asks when Gaussian Naive Bayes draws a quadratic decision boundary and when it draws a linear one. Tests whether you can derive the log-odds of a generative classifier and relate Gaussian Naive Bayes to LDA and QDA.

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

Under what conditions does Gaussian Naive Bayes produce a quadratic rather than a linear decision boundary?

What a Strong Answer Covers Guidance

  • The per-feature Gaussian log-likelihood and the log-odds between two classes
  • The condition under which the squared terms cancel, and what is left when they do
  • The shape of the boundary when they do not cancel, including why there are no cross terms
  • How Gaussian Naive Bayes relates to LDA and QDA, and what a standard implementation such as scikit-learn's GaussianNB does by default

Follow-up Questions Guidance

  • In one dimension, with equal class means and different variances, what does each class's decision region look like?
  • How would you change Gaussian Naive Bayes so its boundary is always linear, and when might that generalize better?
  • Is Gaussian Naive Bayes with tied variances the same model as logistic regression? What differs?
  • Why are multinomial and Bernoulli Naive Bayes linear classifiers?