Paint shade cards
Paint shade cards
Photo by Clay Banks on Unsplash


As a student of data science, I recently learned how to model variable interactions using Ordinary Least Squares (OLS) linear regression. It struck me as strange that the common advice to avoid the Dummy Variable Trap when analyzing categorical variables is to simply drop the first column based on the alpha-numeric category labels.

My intuition was that it must matter to some degree which column we choose to drop. And if it does matter, dropping a column because its label comes first seems very arbitrary and not especially scientific.

I found that while there are plenty of web resources describing…

An example of a Python function I wrote

In this guide, I discuss the benefits of writing functions in Python, provide practical advice for beginners who are learning to write them, and walk through an example.

In programming, a function is a block of reusable code designed to perform a specific task or set of related tasks. They typically allow for different information to be fed into them, in the form of arguments, and execute the task using those inputs in some way, often creating an output at the end. …

In this post, I’ll show you how to add annotations to your visualizations built using Matplotlib.

Annotations allow you to put text labels, boxes and arrows anywhere you like on your graph. Combined with horizontal and vertical lines indicating certain thresholds or values in your data, annotations are an important tool for making your visualizations easy to understand.

Since creating visualizations in Matplotlib is a large topic, I’m going to focus on the annotations and other icing on the metaphorical cake, which assumes you already know the basics of creating graphs. However, it’s worth noting that you can add annotations…

Jessica Miles

Student of Data Science

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