How It Works
Naive Bayes is a probabilistic classifier based on applying Bayes' theorem with strong independence assumptions between features:
- The algorithm models each feature (x, y coordinates) as having a Gaussian distribution for each class
- When classifying a new point, it calculates P(class|features) ∝ P(features|class) × P(class)
- The "naive" assumption is that features are independent, so P(x,y|class) = P(x|class) × P(y|class)
- The class with the highest posterior probability is selected as the prediction
Interactive Features
- Add training points of different classes by clicking on the canvas
- Add test points to see how they get classified
- Toggle distribution visualization to see the Gaussian models for each feature
- View decision boundaries to understand how the algorithm partitions the feature space
- Generate random points to quickly test the algorithm with different data distributions