Overview

Spam Detector is a Naive Bayes classification machine learning model that uses Google Cloud Gmail API to directly access my Gmail inbox, removing spam emails

Naive Bayes Classification Model

The model was trained using this data set using a 80 20 split and uses a Term Frequency-Inverse Document Frequency to determine how important a word is. The TF-IDF vectorizer from Scikit-Learn transforms the text into a matrix of TF-IDF features. The model subsequently uses Baye's theorem to make strong independent assumptions between the features

It is able to predict whether a email is spam with a 96% accuracy

Google Cloud API

I then used the Google Cloud Gmail API to link the model to my Gmail account to detect spam and move it to my spam folder