Classification model

Naive Bayes

A probabilistic classifier based on Bayes theorem with feature independence assumption.

Naive Bayes is a family of probabilistic classifiers based on Bayes' theorem with the "naive" assumption that features are conditionally independent given the class label. Despite this simplifying assumption, it often performs remarkably well in practice, especially for text classification.

Formula

P(y|x) = P(y) โˆแตข P(xแตข|y) / P(x)

How it works

  • Calculates prior probability P(class) from training data
  • Computes likelihood P(features|class) for each class
  • Assumes features are conditionally independent
  • Applies Bayes theorem: P(class|features) โˆ P(class) ร— P(features|class)
  • Predicts class with highest posterior probability

When to use it

  • For text classification and NLP
  • When features are somewhat independent
  • For real-time predictions
  • When training data is limited
  • As a baseline classifier

Advantages

  • Fast training and prediction
  • Works well with high-dimensional data
  • Handles missing values
  • Good with small training sets
  • Simple implementation

Limitations

  • Naive independence assumption
  • Cannot learn feature interactions
  • Probability estimates may be poor
  • Sensitive to feature correlations
  • Zero-frequency problem

Example uses

  • Spam filtering
  • Sentiment analysis
  • Document classification
  • Medical diagnosis
  • Real-time prediction systems

Related models

Need a model built on your data?

Tell us the decision you want to improve. We will tell you whether your data can support it and which approach fits.