Chapter 3: When can I use Machine Learning?

In the previous chapter, we’ve discussed the different advantages that machine learning has over traditional computer science and in what situations it is wise to use it. In this chapter, we’ll focus on what is necessary for a problem to be able to be solved by machine learning.

In his seminal book, Thomas Mitchel defined three required properties for a well-posed machine learning problem.

A well-defined class of tasks

A machine learning problem needs a well-defined class of tasks to perform, something that it has to learn to be good at. It is important that the class of tasks is clear and concise. It could be categorizing e-mails as spam or not spam, identifying the sentiment of a tweet, or even segmenting customer data into several groups for instance.

Remember that any machine learning program could theoretically be written as an explicit program. Therefore, if it cannot be written as an explicit program, it cannot be a machine learning task!

Performance measure

 

Since the goal of a machine learning model is to be good at a class of tasks, we need to define what “good” means. This might be the percentage of spam e-mails that we accurately detect, how close we are to predicting the real sentiment of a tweet, or how well-separated the customer groups that we segmented are to each other.

This performance measure could also include how long it took to train the model, how much data it requires, how human-understandable it is, or other factors. The ultimate goal is to be able to compare two solutions to the same problem and pick the better one, whatever the criteria may be. This means that generally speaking, the performance measure should be able to be represented by a single number.

Performance measure

 

Since the goal of a machine learning model is to be good at a class of tasks, we need to define what “good” means. This might be the percentage of spam e-mails that we accurately detect, how close we are to predicting the real sentiment of a tweet, or how well-separated the customer groups that we segmented are to each other.

This performance measure could also include how long it took to train the model, how much data it requires, how human-understandable it is, or other factors. The ultimate goal is to be able to compare two solutions to the same problem and pick the better one, whatever the criteria may be. This means that generally speaking, the performance measure should be able to be represented by a single number.

Experience

Machine Learning programs are interesting because they learn. But they cannot learn out of thin air. They need to be given input that will help them learn how to perform a class of tasks. This input is often referred to as experience or data. This experience can come in many shapes or forms depending on the task at hand. It could be e-mails labelled as spam or ham, the perceived sentiment of tweets, or even demographic data about customers.

It is important to note that the amount and the quality of the experience, directly impacts how well a machine learning program will perform. Experience is to machine learning as what clear software requirements are to traditional computer science. If the requirements aren’t clear, it will be hard to write a good explicit program. The same holds true for machine learning if the experience provided is not good.