Naive Bayes — class probabilities from one column at a time
Naive Bayes estimates P(class) and P(each column | class), then multiplies them. The naive step is the product: columns are treated as independent given the class. When that is roughly true, the classifier is hard to beat per minute of work. When columns are copies of each other, the product double-counts the evidence and the probabilities become over-confident.
Gaussian Naive Bayes fits a mean and variance per column per class. That matches continuous measurements and fails when a column is a count or a 0/1 flag. Multinomial and Bernoulli variants exist for those. Complement Naive Bayes is the one to try when one class dominates the row count.
Because each column is modeled alone, irrelevant columns still dilute the product. Drop columns that do not differ across classes before you add smoothing.
Settings that change this fit
- variant
- Gaussian for measurements, multinomial for counts, Bernoulli for binary flags. Using Gaussian on word counts produces nonsense variances.
- smoothing
- Adds a little fake evidence so a zero count does not zero the entire product. Increase it when a class has very few rows.