# Supervised Learning & Its Types: Machine Learning Essentials

Welcome back, machine learning geeks! Let’s delve deeper into our journey of mastering machine learning. In the previous article, we looked at both informal and technical definitions of machine learning. We also looked at the two major types of machine learning algorithms, A) supervised machine learning algorithms, and B) unsupervised machine learning algorithms. We […]

Welcome back, machine learning geeks! Let’s delve deeper into our journey of mastering machine learning. In the previous article, we looked at both informal and technical definitions of machine learning.

We also looked at the two major types of machine learning algorithms, A) supervised machine learning algorithms, and B) unsupervised machine learning algorithms. We also mentioned reinforcement learning and recommender systems, but won’t spend as much time there.

Let’s jump in!

## Introduction to Supervised Learning

Supervised machine learning algorithms are used when you:

- Have a set of known, correctly labeled data
- Are looking to predict a continuous value output

Let’s visualize by looking at a digital marketing example.

Perhaps we are digital marketers looking to forecast or predict how much time and effort we’ll need to spend on outreach and content promotion for a particular webpage and target ranking.

Say we’ve gathered some data about website pages with:

- Their rank for a given keyword
- The amount of unique linking domains pointing to each page

Such a distribution of data might look like the below. It demonstrates a trend, but right now, we don’t have a single linear function that will “connect all the dots”.

This is a great example for the first major subdivision of supervised machine learning algorithms:

## Regression Learning Problem

Off the cuff, there are a couple of different ways in which we might try to solve this problem. Both solutions involve using the “labeled” data to predict a line of best fit, which, on the whole, minimizes the distance between the line and all the points. If we have a simple slope, predictions could be precarious at best, and misrepresentative on the other end of the spectrum.

We could also instruct our programs to fit a quadratic equation to the data (read: not a straight line.) In our slightly altered example here, the difference could be significant.

At this point in time, we won’t focus on whether we should pick a linear or quadratic line for the regression output. However, it is worth noting that the two different methods could yield widely varying results.

Say we wanted to get a webpage ranking in position 5 for this given study, a linear example would have us preparing to secure links from ~180 unique domains. If we decided on the quadratic solution, we could be looking at significantly less effort, perhaps ~125 unique linking domains?

## Classification Learning Problem

Insert smooth segue here and please forgive my lazy writing at this time. 🙂

The next major subdivision of supervised machine learning algorithms is known as a classification problem. Let’s use another example.

We are analyzing a large user study of an Amazon Alexa Skill in development. Perhaps we are classifying a particular interaction with the skill by success or failure (1 or 0), and plotted against the measured spoken word count for the given interaction.

Visualized, this data might look like the below.

In this example with (shockingly 🙂 ) clean data, we might want to guide development efforts in providing the best sample phrases/interactions for the skill. Perhaps, we would want to measure the probability an interaction four (4) spoken words long will be successful. This is known as a classification learning problem.

Above, we examined only one factor in determining a probability. However, we aren’t limited to examining just one parameter.

Let’s consider the following, perhaps we are an e-commerce retailer or digital business. A frustration for many marketers is the “one and done” (self explanatory) customer that represents minimal customer lifetime value for the brand.

It would certainly behoove us to identify these customers and provide them with specialized messaging or a compelling promotion offer to keep them engaged and transacting with the brand.

Below, we could have a sample data set to which we fit a line, and thereby predict based on a certain age and AOV (average order value) profile whether a particular transaction is likely or not to be a “one and done” consumer.

In practice, we could potentially use a number of inputs to help solve machine learning problems. There are even methods to use an “unlimited” number of inputs- support vector machines. But only a tease for now!

## Wrap-Up

Our first major classification of machine learning algorithms is supervised learning! In supervised learning, we assist the program by supplying the correct answers in part, and then mandating the program supply correct values via regression or classification, the two major categories of supervised machine learning problems.

Moving forward, we’ll dive deeper into one variable linear regression (dare we say the hello world of machine learning?) as well as fleshing other key concepts and methods. If you’re interested in this, you might also be interested in learning PostgreSQL, how to develop Alexa skills, or algorithmic trading. Take care.