DIY machine learning model in 3 minutes

Image for post
Image for post

Machine learning has always been seen as a black box, with its root in calculus, linear algebra, and statistics. In reality, it’s much more compact and easier than most algorithms out there. Here’s how to build a spam detection algorithm in 15 lines of code. Follow alongside with me or just skim through!

Import necessary packages

import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer
from sklearn import svm

import pandas as pd imports pandas a data cleaning and analysis package. …


It’s way easier than you would think.

Much of the content below is based on the Intro to Deep Learning with PyTorch course by Facebook AI. If you want to learn more, take the course, or just take a look here.

Imagine this you’re a computer science student and want to know what your chances of making it to your dream university are.

Below is a graph that determines whether or not a student will be accepted into a university. Two pieces of data have been used: grades and tests each on a scale of 0–10. …


It’s way easier than you would think.

Much of the content below is based on the Intro to Deep Learning with PyTorch course by Facebook AI. If you want to learn more, take the course, or just take a look here.

Below is a graph that determines whether or not a student will be accepted into a university. Two pieces of data have been used: grades and tests each on a scale of 0–10. Applicants that have been accepted are in blue with those rejected in red.

Let’s say a student with test 7 and grade 6 wants to know…


Tearing down the mystique of quantum, and some thoughts on its future.

The start of the twenty-first century is an exciting time to be alive. A look at the start of the twentieth century juxtaposed to the end of shows how far humanity has come. The 1900s started without tea bags and ended with the discovery of nuclear power. Imagine what we can achieve by the end of this century! Whatever the twenty-second century brings, science and technology will definitely be at the forefront. Nonetheless, when we look a modern technology, it’s the same idea recycled or upgraded over and…


Nanosensors are an umbrella term for any device that is capable of conveying information about a particle at the nanoscale(one-billionth of a meter). Nanosensors measure physical aspects and converts them to signals that can be recorded and analyzed.

But first off how big — or in the case small is a billionth of a meter? Take a look around you, what is the smallest thing you see? If you can’t find anything look at a piece of paper. See how thin it is? Now try to imagine it 75,000 times smaller. That’s about how big a nanometer is. Another way…


When you read or hear about the term neurology, what is the first thing that comes to your mind? For most it would likely be something that is extremely complex, something you need a degree to understand, something on par with Quantum Computing in complexity. But the thing is Neurology doesn’t need to be complex, anything is as complex as you make it to be. In fact your brain in convincing you that Neurology is complex it is effectively hindering its own study! Sure, more branches of sciences are expanding but at the end of the day we must remember…

Edward Wang

Artificial Intelligence, Deep learning enthusiast.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store