The 3 Basics of Machine Learning (No Math)

Markus Schmitt
8 min readMar 15, 2018

--

We all talk a lot about machine learning and AI. Still, many people think of machine learning as a complicated black box. It doesn’t have to be.

If you’ve always wanted to be part of the discussion and find your own use cases for AI, here is what you need to know:

  1. What is machine learning?
  2. When can you use machine learning?
  3. What are the common misconceptions?

What is machine learning?

Say you want to fill a gap in your knowledge. You want to use the information you have to effectively guess some other piece of information. Inferring knowledge is usually a human task. But the exciting thing about machine learning is that now computers can do some learning too.

Machine learning is just a tool — a software you can use to find valuable patterns in large amounts of data. Once the software has discovered and saved the patterns, you can use them to make predictions.

So machine learning is about automating predictions: automatically finding patterns and using them.

Data → Patterns → Predictions

Example

Take a desired outcome (a customer buys a product) and some influencing factors (all the things the customer did before). You might ask yourself: What kind of behaviour means a customer will make a purchase, and what behaviour means they will not? The better your answer to this question, the better you will be able to predict every customer’s purchases in the future.

Behaviour → Patterns → Purchase

How do you find patterns without using machine learning?

If you don’t use machine learning, you can try to get the patterns from an expert. For example, what does your product manager think separates buyers from non-buyers?

Based on their answers, you can write down a set of rules and work with an engineer to automate those rules with software. An example rule could be:

“Every user who viewed more than 4 products in the last 24 hours will be tagged as high potential.”

However, this approach has some drawbacks:

It’s slow and expensive. Collecting the information, and especially writing the software, takes a lot of valuable time and resources.

It’s rough. Humans don’t have very exact intuitions about the best cutoff between high and low potential: Is it 4 product views or 7? The input you get will also be biased by human opinions, which means you will miss the surprising patterns.

It’s naive. We are all bad at writing down very complex interactions, either on paper or in software. As soon as you have 6 or more rules, it will be hard to add more without losing sight of the whole picture.

Machine learning automates all these steps

Machine learning can automatically find patterns in data and then write them into a ruleset (also called a model).

Compared to relying on human intuition, this process has clear advantages:

It’s data based. The algorithm doesn’t have a bias. It finds whatever pattern is in the data, including quirky, surprising patterns that might not make so much sense to us.

It’s fast and cheap. Training a model on even a huge dataset of several Terabytes will usually cost you no more than $10 in cloud computing rental costs. Most of the time, we’re talking about a few cents.

It’s smart. Computers are very good at exact calculations, and they also have perfect memory. So for software, it’s rather simple to build big, interconnected rulesets. The models a machine learning algorithm produces can easily have thousands of rules, capturing many minute patterns. And they are built with only one goal in mind: making the most accurate predictions possible.

| Manual Rules       | Machine Learning     |
|--------------------|----------------------|
| Slow and Expensive | Fast and Cheap |
| Biased and Rough | Data Based and Exact |
| Naive | Complex (Smart) |

When can you use machine learning?

Machine learning is a powerful tool, but only if certain conditions are met:

1. You need a lot of examples

Photo by bady qb on Unsplash

To be more precise, you need a minimum of 500 examples of each of the outcomes that you want to predict. If you want to predict when a user will purchase a particular product, you need to have at least 500 examples of users who purchased that product and 500 examples of users who didn’t.

2. The examples need to include exactly the outcome that you want to predict

For example: Don’t expect to train an algorithm on users who liked a product and then use it to predict users who will purchase a product.

Machine learning algorithms, unlike humans, don’t transfer learning from one situation to a similar but different situation. It has to be the same situation: exactly the same input factors, and the same outcomes to predict.

3. The input data needs to be relevant

Machine learning can only find patterns if they exist in your data. The most important information for making the right prediction has to be in the data you train the model on. Only then does the model have a chance of finding the right patterns.

If you want to predict a user’s next purchase, for example, you need to have his past purchases as input data, since those certainly contain valuable information about his next purchase.

If you only have that information in the CRM while the other information, like how often he logged in, is in your web analytics data, then you should make the effort to combine these datasets.

There is a quick way of checking which datasets you might need as input factors: What information would you, as a human, use to make a good prediction? What could be relevant?

Our brain is immensely powerful when it comes to finding patterns subconsciously, so our intuitions about which data could be useful are very good.

Conversely, if you believe that you, as a human, probably couldn’t predict the outcome based on these inputs, that’s a red flag. Machine learning will probably not find anything either, so this might not be a good place to apply it.

The human subconscious is the master of pattern finding. We might take longer, but we are still better. If we can’t do it, then an algorithm probably won’t be able to do it either.

4. Your data needs to be neatly quantified

Machine learning algorithms can usually only work with data in a format similar to an Excel spreadsheet: in table format.

The algorithm doesn’t have our senses or our understanding. For example, it can’t actually read text. It understands text as numbers, as counts of words and letters.

You need to prepare the input factors neatly in a machine readable format. This process is super important and is known as feature engineering. Feature engineering is much more important than which algorithm you work with. The better you prepare the data, the better the algorithm can learn, and the better your predictions will be.

What are the common misconceptions?

There are 3 widespread misconceptions:

  1. AI replaces humans
  2. The algorithm is the important part
  3. Machine Learning is about learning from feedback

AI does not replace humans

If a job is important enough that it is currently done by a human, don’t try to automate it with AI.

To some extent, AI software is modeled after how we think our brains learn. But it’s an extreme simplification of even the little bit we know about brains. Our brains are still far ahead of any algorithm when it comes to learning and applying knowledge.

Comparing AI to a human brain is like comparing a car to the human body: We certainly don’t see cars as competition for our bodies. They can cover distances faster under very specific circumstances (long stretches of more or less even ground), but they are not better at moving. They are just a tool that can do one thing well.

AI is good at finding patterns from neat datasets, but that’s mostly it.

Most human jobs involve work that AI is not good at:

  • We deal with new situations all the time.
  • We usually hunt down information from many different sources on the fly. The input factors for our work are not neatly quantified and captured in databases.
  • We constantly interact with other humans, who see the world more or less as we do and whom we can understand.

As a rule of thumb: If a job is important enough that it is currently done by a human, don’t try to automate it with AI. You will most likely fail.

Instead, use AI to replace rules written by humans. Use smart automation to replace naive automation.

The algorithm is not that important

Success or failure is decided by problem choice, data and data preparation, not the algorithm.

Algorithms get a lot of attention. Products that use the newest kinds of “Neural Networks” are supposedly superior. But the truth is that the ROI on your machine learning project is not determined by the algorithm.

What determines the performance of your system is how well you choose the right problem, which data you include, and how well you prepare your data (see feature engineering).

More than 80% of the effort in any machine learning project goes into those decisions. It’s not often talked about, but it’s exactly these decisions that determine success or failure.

After you’ve made the right choices when it comes to the problem, data, and preparation, you can spend some time finding a very good algorithm, and then a little time tuning that algorithm.

Machine Learning is not a “learning system”

There is a widespread idea that machine learning systems are designed to learn from feedback and improve over time. This incremental learning is supposed to be the genius part, like an active interaction with users, markets, etc.

It’s a sticky idea, because it sounds like the way we learn. But this is not how machine learning works in practice. Machine learning requires a large existing set of structured examples to train on.

At a later point — maybe after a couple of weeks, when you’ve collected more data — you can train the model again. Or you can even train a new model every day. But these are small, incremental updates that don’t make a big difference to the outcome.

The important part is the big bulk of data that you already have at the beginning. If you don’t have that, you can’t build AI into your product.

TL;DR

So machine learning is a great tool for finding complex patterns in your big datasets and then using those patterns to make predictions.

If you are already using some automated decisions in your business, see whether you can make them more accurate with machine learning.

Want to learn more? We are, Data Revenue, a team of machine learning engineers from Berlin, Germany. We build custom machine learning systems for some of the largest web, tv, and bioinformatics companies.

Write me directly: m.schmitt [at] datarevenue.de

Further Reading

--

--

Markus Schmitt

Founder at Data Revenue – We speed up Biologists with custom built ML Software | www.datarevenue.com