/Naive_bayes_Implementation

The goal of this project is to classify the text into spam/ham using Naive Bayes algorithm which is written from scratch.

Primary LanguageJupyter Notebook

Naive Bayes algorithm implementation from scratch

1. Introduction

This repository makes use of SMS spam collection dataset which consists of a collection of 5574 labeled SMS text messages. The main goal here is to implement the Naïve Bayes algorithm to create a spam classifier (filter). K-Fold cross validation was used to evaluate the model. The dataset was split into five equal partitions where one fold was used as test set and the remaining folds were used as training set.The model evaluation metrics such as accuracy, precision, recall as well as confusion matrix were then used to evaluate its performance.