Pandas Melt, Explained

In this blog post, I’ll show you how to use the Pandas melt method. I explain what melt does, how the syntax works, and I’ll show you a simple example. If you need something specific, you can click on any of the following links: Table of Contents: Introduction Syntax Examples Frequently Asked Questions Having said … Read more

Sklearn confusion_matrix, Explained

An image of a confusion matrix, similar to the type of confusion matrix that we would make with Sklearn confusion_matrix.

Scikit-learn, which is affectionately known as sklearn among Python data scientists, is a Python library that offers a wide range of machine learning tools. Among these tools is the confusion_matrix function, which is indispensable when working on classification problems. So in this tutorial, I’ll show you how to use the sklearn confusion_matrix function. I’ll give … Read more

The 5 Python Skills You Need Before You Study Machine Learning

And image showing the 5 Python skills you need before you study machine learning.

Machine learning is a very powerful skill. And machine learning is a valuable skill. According to Glassdoor, the average salary for a machine learning engineer is about $140,000 in 2023. Mastering machine learning could increase your earning power a lot. The question is, how? What’s the best way to get started with machine learning? What … Read more

7 Secrets To Help You Master Python Data Science

If you’ve been reading the Sharp Sight blog for a while, you’ll know that I’m a big fan of elite performers: Navy SEALs, elite athletes, grandmaster chess players, etcetera. I like to research how elite performers operate, because I want to find what makes them special. The techniques. The training methods. The mindsets. In particular, … Read more

How to Use the Sklearn Logistic Regression Function

An image of a logistic regression model made with Scikit-learn, also showing a piece of Scikit-learn code.

In this tutorial, I’ll show you how to use the Sklearn Logistic Regression function to create logistic regression models in Python. I’ll quickly review what logistic regression is, explain the syntax of Sklearn LogisticRegression, and I’ll show you a step-by-step example of how to use the technique. If you need something specific, just click on … Read more

Sklearn make_classification, Explained

An image of code that uses Scikit-learn make_classification to create a binary classification dataset, and an image of a scatterplot that plots the resulting binary data.

With the rise of AI, machine learning has suddenly become very popular. Machine learning has been around for decades, but machine learning systems are becoming increasingly important in a range of fields, from healthcare, to finance, to marketing. Python, with a range of libraries for data science and ML, has arguably become the top language … Read more

Data Project: Get and Analyze ‘Quality of Life’ Data for World Cities

An image of Lisbon, Portugal with the heading "Data Project: Finding Great Cities"

I have a confession. I’m an American, and I was raised an American. But, I’ve been semi-nomadic for almost 10 years. A “digital nomad.” That is, I’ve lived in many countries around the world since about 2014 (although, I also lived a substantial amount of time in Austin, Texas during the last 10 years). I’m … Read more