What Is Machine Learning?
Learn the essential concepts of machine learning, including the definition, types of algorithms, and the main categories of supervised, unsupervised, and reinforcement learning. Understand how data and labels impact learning and why supervised learning is widely used in data science.
Definition of machine learning
While there are many definitions of machine learning, this course uses the following: “The field of study that gives computers the capability to learn without being explicitly programmed.”
This definition was written by Arthur Samuel, an early pioneer in artificial intelligence who is credited with coining the term “machine learning” in 1959.
Data scientists use machine learning algorithms developed by others to allow the computer to learn from data.
What is an algorithm?
An algorithm is a well-defined procedure or formula that takes input and produces output. That’s a bit abstract, so consider the following analogy: preparing a meal using a recipe.
Cooking recipes are like algorithms.
A typical recipe starts with a list of the raw ingredients. In the case of machine learning algorithms, the raw ingredients are data.
Next, a recipe provides instructions on preparing and processing the ingredients. Often, recipes have multiple preparation steps. Machine learning algorithms typically have many steps for preparing and processing the data.
After preparing and processing, a recipe provides instructions for cooking the ingredients (e.g., baking the meal in the oven for 45 minutes at 425 degrees). Similarly, machine learning algorithms also have settings used to “cook” the data.
Last, completion of the recipe gives the output: a meal. Similarly, a machine learning algorithm’s output is a predictive model.
Different kinds of algorithms
Given the above definition, machine learning allows computers to learn without being explicitly programmed. Over the years, three categories of machine learning have been developed:
Supervised Learning
Unsupervised Learning
Reinforcement Learning
Supervised learning
Supervised learning algorithms require data that is a collection of observations, where each observation has a label. The algorithm learns by recognizing patterns in the data associated with labels.
For example, the Titanic dataset has the Survived column that functions as the label. If a supervised learning algorithm is applied to the Titanic dataset, the algorithm will use the other data features to find patterns highly associated with passenger survival.
In other words, the algorithm would produce a model from the data that predicts passenger survival based on the features of the passenger.
Unsupervised learning
In unsupervised learning, there are no labels in the data. Unsupervised learning algorithms look at the data to find patterns and provide these patterns as output. Unlike supervised learning, the final output of unsupervised learning is not known at the beginning.
The most common form of unsupervised learning used in data science is cluster analysis.
Clustering algorithms search the data for observations similar to each other based on the provided features. As the algorithm processes the data, similar observations are aggregated into groups. The groupings in the data are the output of the algorithm.
Reinforcement learning
Like unsupervised learning, there are no data labels in reinforcement learning. However, reinforcement learning requires the output to be known upfront—the opposite of unsupervised learning.
A prime example of reinforcement learning is teaching computers how to play games. For example, the output (i.e., winning) is known upfront, as are the parameters for getting to the output (i.e., the rules).
Conceptually, reinforcement algorithms attempt to achieve the output many times. Each attempt receives a score based on the quality of the output (e.g., winning vs. losing). The algorithm learns by attempting different paths to the output and recognizing which patterns are most successful over time.
Supervised learning is everywhere
Professional data scientists overwhelmingly use supervised learning in their work. While unsupervised learning is also used broadly, it’s a distant second compared to supervised learning.
So, the focus of this course is the supervised learning.