You are browsing as a guest. Sign up (or log in) to start making projects!

Spam Email Classifier

  • 1 Devlogs
  • 1 Total hours

A single-layer perceptron which can classify emails as spam or not spam.

Ship #1 Pending review

I made a single-layer perceptron from scratch, which is a machine learning algorithm. I decided to make this as I am currently learning about perceptrons in my computer science class and thought it would be cool to try and implement one in python. I made a version that can seperate data-points above and below the line x+y=10 and then a more advanced version which can detect if emails are spam or not spam. It was challenging to convert the emails.csv into inputs that the perceptron could handle, but after some research I found that TF-IDF is a good way of converting the emails into vectorised inputs that the perceptron can handle, and then made it output -1 for not spam or +1 for spam. I am proud of how accurate the perceptron is when using such a simple machine learning model, and it is also really cool to watch the simple higher-lower perceptron seperate the points in 2D with a line in real-time. To test it, follow the setup instructions in the README. I hope you enjoy!

  • 1 devlog
  • 1h
Try project → See source code →
Open comments for this post

1h 26m 36s logged

I made a perceptron which can detect spam emails, as we learnt about them in my computer science class, so I decided to try and implement one from scratch. I first made a basic perceptron that can seperate points that lie above or below the line x+y=10 line, and then applied the same algorithm to classify emails as either spam or not spam. It ended up working really well and gets 99.21% accuracy for spam detection.

0
0
5

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…