Machine learning is very prevalent these days. But you may not understand all of the lingo. In this article, we will discuss what the difference is between a machine learning model and a machine learning algorithm. We will also discuss when to use what models, and a few, types of machine learning algorithms.

Models

Machine learning models are at their core, very complicated statistical formulas. You give the model a set of inputs, these inputs are run through your formulas, and then you get an output. There are different kinds of models for different kinds of problems. The three main kinds of machine learning models:

• Binary Classification models
• Multiclass Classification models
• Regression Models

Binary Classification

A binary classification model is just a yes or no question. Things like:

• Is this email Spam?
• Is the cat black?
• Is it daytime?

Multiclass Classification

A multiclass classification model is a more complicated question such as:

• What kind of car is this? (Ford, Chevrolet, BMW)
• What Language is being spoken? (English, Spanish, Russian)
• What kind of movie is this? (Comedy, Drama, Horror)

Regression Model

Regression models are used for making predictions. Things such as:

• What will be tomorrowâ€™s stock price?
• What will the temperature be tomorrow in San Diego?
• How much will my house sell for?

Kinds of Algorithms

There are three kinds of algorithms:

• supervised
• Unsupervised
• Reinforcement

When considering the kind of algorithm to use, it is more about what your dataset looks like, and less about what you expect to get out of the algorithm. Think of it like this, you choose your model based on what you want to get out of your machine learning experiment. You choose your algorithm based on how you want to train your model. What your dataset looks like will be a major factor in the kind of algorithm you choose.

Supervised Learning

In supervised learning algorithms you provide the labeled data to your algorithm. Then the algorithm uses your labels to train itself. A good example is spam filtering. You take a large dataset of emails labeled as spam and not spam. You feed this dataset into your algorithm, and the model learns what emails are spam based on the classifications you provided.

You are generally going to use supervised learning for your binary and multiclass classification models. However, that is not a hard and fast rule.

Unsupervised Learning

Unsupervised learning is when the algorithm starts off without any of the data labeled, then it has to figure out what the data is. This is kind of like a baby trying to learn how things work in the world. It does not have a frame of reference to start from. It does this by trying to spot patterns and differences.

For example, you might feed in historical stock price data for the last 2 years. Your model ingests this data and is used to predict future stock prices. You have not provided any sort of labels to the data, just the raw data.

Reinforcement Learning

Reinforcement learning is when there is some positive signal to tell the algorithm that it did something right. For example, if you are training your algorithm to play chess, you might give it a +1 if it wins the game and a -1 if it looses the game. If it gets a +1 it will know that it needs to do more things like what it did last time, otherwise it will know to try something different. As it does more things right, that behaviour will be reinforced.

In a future article we will discuss specific algorithms, what sorts of models they fit into, and what kind of learning they go with.