Python / Data Science / Modeling / Tutorial

Streamline your model optimization by combining these two powerful modules

Image for post
Image for post
Photo by Christophe Dion on Unsplash

If you’ve successfully built data models using Python and SciKit Learn, and you aren’t leveraging Pipelines and GridSearch, then I’m about to CHANGE YOUR LIFE! …Or at least that’s what I’d say if this were a clickbait article… But really, adding these two modeling objects to your code will improve readability, reproducibility, and decrease room for error in your code. Each of the modeling techniques we’re going to focus on is powerful and useful in its own rite, but when used in combination, magic happens.

First, a refresher

Before we dive into the…


Data Science / Data Analysis / Statistics

A look at how personal bias and intellectual dishonesty can affect data analysis

Image for post
Image for post
Photo by Isaac Smith on Unsplash

Big Tech and Big Data have enabled previously unimaginable power when it comes to predicting outcomes and behaviors. Given the availability of highly personal data and raw computing power accessible to us, data scientists are able to create very powerful models that can predict patterns of consumption, travel, and behavior with reasonably high accuracy. Ethical implications of this are many—far more complicated and nuanced than the scope of this article can cover.

One consequence of this so-called “golden age of data” is that institutions turn to data analysis and regression as a solution to most problems or questions. This places…


Learning Python / Beginner / Tutorial

A beginner’s guide to Python object comprehensions and protecting your home from a Joe Pesci-type burglar

Image for post
Image for post
Photo by Christopher Gower on Unsplash

As you undoubtedly remember from my last article on the subject, list comprehensions allow for more dynamic, readable, and efficient list creation. However, there is far more to a comprehension than just putting items in a list from an existing iterable. We can make more powerful comprehensions by using conditional statements, introducing more than one dummy variable, and leveraging other Python class comprehensions like dictionary comprehensions.

On one condition…

Last time we looked at how to make a basic list comprehension. Now we’re gonna go a bit deeper. Let’s look at our example [x+5 for x in range(6)] from last time. Recall that…


Image for post
Image for post
Photo by Markus Winkler on Unsplash

“Wow, how did I end up here? I just wanted to find a simple explanation of what the heck a list comprehension is and now I’ve read 10 articles that are all incredibly complicated and I still don’t get why I shouldn’t just use a for loop.” Well, here you are, I’m gonna simply break down how to understand and formulate list comprehensions, and teach you how to garner a promotion from a fictional government agency.

Why?

You may be sitting there saying to yourself, “I understand for loops and how to make them, why waste my finite amount of time…

Joe Marx

Actor turned Data Scientist looking for applause some other way

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