What Is Machine Learning?
An Introduction
Machine learning is one of the most important techniques in AI today. By using machine learning methods, we can allow a program or algorithm to learn, at least in part, how to accomplish a task from data, rather than needing to specify every detail in the program. For complex tasks, the development of an algorithm tends to require a great deal of adjustment of values.
Consider, for example, a program that monitors the temperature of a computer to detect if there is a problem with the cooling system and warn the user. A typical desktop or laptop computer generates a lot of heat in a small space, but if it gets too hot it can lead to system crashes and even damage to the computer hardware, so it needs an efficient cooling system. Servers have even greater cooling requirements. If the cooling system fails, the computer system is at risk!
One possible way to design a system like this is to set up a threshold for the temperature, just below the level that would cause serious problems. We can generally get this sort of information from hardware documents. This would give a warning, but not until the last minute—it would be better to detect the problem earlier if we can, to give more time to save work and shut down the system for maintenance. The heat generated in a computer depends on how hard the system is working, so we might want to set a maximum “reasonable” temperature for different levels of load on the system. This would allow us to spot that the cooling system might be failing at a much lower temperature if the system is lightly loaded, and give us plenty of time to respond.
Since the system doesn’t necessarily cool down instantly when the load drops, we’d also need to consider the recent load to ensure that we don’t trigger a warning as soon as a high-load program finishes what it was doing. This means we need to set a lot of temperature thresholds for different load patterns, and we don’t have a convenient reference like we might for a maximum operating temperature. This kind of adjustment or tuning is often a good candidate for machine learning—if we have the right data to learn from!
In this case, good data to learn from would be a log of system loads and temperatures. If we can assume that the cooling system is fine throughout the time we were logging information, we can learn what to expect if there isn’t a problem, and warn the user if the temperature is higher than the system has learned to expect. We don’t need to adjust everything by hand—the machine learning algorithm will do it for us!
Will this always work? Not necessarily. For our system temperature example, if we don’t have very much data, we won’t be able to say much about what “typical” means. Even if we do have a lot of data, we can encounter problems if the system was almost always almost idle or very heavily loaded; we wouldn’t have very much information about the expected temperatures at moderate loads, so the learned temperature thresholds would be reliable near 0% load and near 100% load, but unreliable around 50% load.
Generally speaking, a good dataset to learn from will be sufficiently large, cover all of the types of situation the algorithm might see, and will be very similar to the data that the algorithm will see in practice. How much data is enough depends on the learning algorithm and the problem. As a very rough guide, a simple problem with clean data, combined with a good learning algorithm for the problem, can work with dozens of examples, while a very complex problem solved with a deep learning algorithm (like generating captions for images) might need many millions of examples!
To build a machine learning system, we need to consider what we need to accomplish, what kind of data we have, and how much data we can get. There are many trade-offs to consider, so it requires professional judgment to get the best results. Despite these challenges, however, machine learning offers a very powerful tool for solving many practical problems—many of which would not be practical without it.

