daisuke-ai/SpamFilterNBC
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Naive Bayes Classifier from Scratch Introduction This repository contains a complete implementation of the Naive Bayes Classifier built from scratch in Python. The implementation is broken down into three Jupyter notebooks to make it easier to follow: preprocessing, training, and evaluation. Usage Download the zip folder for all the files and load them into the notebook. Open each notebook and run the cells sequentially to experience the end-to-end machine learning process from preprocessing to evaluation. Notebooks 1. Preprocessing This notebook takes you through all the preprocessing steps necessary to prepare the data for training. The tasks include data cleaning, normalization, and splitting the dataset into training and test sets. 2. Training In this notebook, the Naive Bayes model is trained using the preprocessed data. The notebook explains the mathematical theory behind Naive Bayes and how it is applied for classification. 3. Evaluation This notebook contains various metrics to evaluate the performance of the trained Naive Bayes model. We explore accuracy, precision, recall, F1-score, and also visualize the results through a confusion matrix. Technologies Python Pandas NumPy Matplotlib Seaborn Contributing Feel free to fork the repository and submit pull requests.