Data Analysis | Scientist | Storyteller | Growth Mindset

How to implement sample weights for classification in a Scikit-Learn pipeline

A balanced two-sided scale.
Photo by Elena Mozhvilo on Unsplash

Imagine being asked the familiar riddle — “Which weighs more: a pound of lead or a pound of feathers?” As you prepare to assertively announce that they weigh the same, you realize the inquirer has already stolen your wallet from your back pocket.

Why is balance important?

In supervised machine learning, it is important…

Another option for bypassing the local machine and downloading web data directly into Google Drive.

Game-changing Chrome extension!

This is a follow-up to my article about using Google Colab with Kaggle completely on virtual machines. Here, I demonstrate how to save any internet download directly into your Google Drive, no need to waste space or time with your local machine!

  1. Add the “Save to Google Drive” extension to…

Instructions to use the Kaggle API to download and work with data entirely on Google’s virtual machine.

An astronaut leaving the limited world of her personal computer behind, and embarking on a journey to the virtual machine.
A data scientist leaving behind the limited world of her personal computer and embarking on a journey to the virtual machine. (Photo by The New York Public Library on Unsplash)

There are many perks to working in Google Colaboratory, or “Colab” for short, for data science projects. For those like me, who are plugging away on an older laptop — the main highlight is the free access to accelerated hardware GPU/TPU for larger projects.

For the Phase 4 Project of…

Anna D'Angela

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