Does Gaussian Naive Bayes require feature scaling?

Quick Overview

Asks whether Gaussian Naive Bayes needs feature scaling and why. Tests how per-class means and variances respond to a linear rescaling, which implementation details such as variance smoothing can make scale matter, and which non-linear transforms change predictions.

Does Gaussian Naive Bayes require feature scaling?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Does Gaussian Naive Bayes require feature scaling? Many models, such as k-nearest neighbors, SVMs and regularized linear models, are sensitive to feature scale. Explain whether Gaussian Naive Bayes is, and why. ```hint Track the fitted parameters Apply $x' = ax + b$ to one feature and work out what happens to each class's fitted mean and variance, then to each class's log-likelihood. ``` ### What a Strong Answer Covers - How Gaussian Naive Bayes estimates a per-class mean and variance for each feature - Whether and why a linear rescaling of a feature changes the prediction - Implementation details that can make scaling matter - Which transforms do change predictions, and when they help ### Follow-up Questions - If you standardize features before Gaussian Naive Bayes, do the predicted probabilities change, or only the labels? - How should the model handle a feature that has zero variance within one class? - When would a log transform help Gaussian Naive Bayes, and when could it hurt? - Does the answer change if Gaussian Naive Bayes runs after PCA in a pipeline?

Overview: Asks whether Gaussian Naive Bayes needs feature scaling and why. Tests how per-class means and variances respond to a linear rescaling, which implementation details such as variance smoothing can make scale matter, and which non-linear transforms change predictions.

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

Does Gaussian Naive Bayes require feature scaling?

Many models, such as k-nearest neighbors, SVMs and regularized linear models, are sensitive to feature scale. Explain whether Gaussian Naive Bayes is, and why.

What a Strong Answer Covers Guidance

  • How Gaussian Naive Bayes estimates a per-class mean and variance for each feature
  • Whether and why a linear rescaling of a feature changes the prediction
  • Implementation details that can make scaling matter
  • Which transforms do change predictions, and when they help

Follow-up Questions Guidance

  • If you standardize features before Gaussian Naive Bayes, do the predicted probabilities change, or only the labels?
  • How should the model handle a feature that has zero variance within one class?
  • When would a log transform help Gaussian Naive Bayes, and when could it hurt?
  • Does the answer change if Gaussian Naive Bayes runs after PCA in a pipeline?