all pictures courtesy of

We’ve all been there — having all felt that fear before we shift + enter on our .value_counts().

Rarely do we get the satisfaction of finding a 50/50 split for our binary target. Rarely enough, that we might be releived to see 60% 0’s and 40% 1’s. But what happens when we have a million 0’s, and only a handful of 1's? Well, don’t give up hope, and certainly don’t trust that 98% accuracy on your first model!

For this walk-through, we’ll be using the stroke prediction data set, which can be found on Kaggle. For now, also import the…

When I say beginner, I don’t just mean you.

all photos courtesy of

Last time, in-case you missed it, we dove head first into a simple linear regression. Before we revisit that analysis, let’s get familiar with binary classification.

What is a binary classification? Well, we are going to train our machines to determine if a thing is a 1 or 0. Pretty simple, right? Get ready to code along in your notebook (or copy and paste — I won’t judge).

Let’s start with importing the libraries we are going to need:

import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import…

When I say beginner, I don’t just mean you.

all photos courtesy of

One of the greatest obstacles to learning a technical subject, is finding a teacher that can relate the new information to you in a way that is accessible. If you have ever taken a calculus based physics class, or tried to watch a programming tutorial on YouTube, you probably noticed that these brilliant instructors aren’t always the best at this. They may throw out concepts and terms that are (for now!) way over our heads.

This quick lesson is for beginners, by a beginner, and will hopefully serve as a great…

image from

Any chemist who has ever fit curve after curve to calibration data, trying to get the coveted 1.0000 r-squared value, will instantly see the value machine learning can bring to the field. In fact, despite what we see watching CSI and our favorite police procedurals, there is no magic instrument that can deduce molecular structures, give exact concentrations, or even say, “hey, I think you’ve got some analyte here!”

Just about everything an analytical chemist does is a “guess,” based on a combination of what the chemist knows, and what the instrument knows. Most often, for quantitative analysis, a software…

by Corey J Sinnott

My career path has been a winding road. After spending my early twenties in the military and working defense contracts, and trying to fit classes in between, I finished a BS in chemistry. I went on to work in research for the USDA, manage a food testing lab, and work as a researcher in environmental engineering. Despite being rewarding and challenging jobs, the average time I spent in each was only eight months. In every position, the stress of finances, lack of healthcare, and lack of opportunity to remedy those conflicts loomed and kept me on…

Corey J Sinnott

Aspiring Data Scientist and student at General Assembly.

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