Machine Learning
What is Machine Learning?
Machine learning (ML) is a subset of artificial intelligence (AI) that uses statistical techniques to enable machines to learn from data and improve over time, loosely based on human learning. By analyzing data and using trial and error, ML algorithms can generate accurate predictions, content, recommendations, and decisions without being explicitly programmed.
The Basic Idea
Even if we are fans of staying up to date with the latest technology, it’s easy to mix up the different types of artificial intelligence and what they do. Since AI is so complex and multifaceted, this article will focus on machine learning (ML).
Machine learning is a type of AI that allows a machine to learn from its environment, rather than having to be explicitly preprogrammed to generate predictions, content, recommendations, or decisions. Quickly changing and incredibly powerful, ML technology is already reshaping our world and beliefs of what computers are capable of.
Although we might hear people use the terms “machine learning” and “artificial intelligence” interchangeably, let’s get one thing straight: ML and AI aren’t the same thing. ML is a subset of AI.
AI: Artificial intelligence refers to any systems that aim to match or exceed human capabilities by generating outputs that require humanlike reasoning and decision-making.
ML: Machine learning is a field of AI using a set of statistical techniques that enable a machine to learn from the environment rather than having to be explicitly preprogrammed to generate predictions.
Therefore, ML is always AI, but AI doesn’t always need to be achieved through ML.
For example, in rule-based statements, programmers might give an AI system explicit if-then statements (for example, "if a dog is ‘under two years old,’ classify the dog as a ‘puppy’”).1 This is not an example of machine learning since the algorithm does not need to learn these rules itself.
Now, let’s dig into some of the different types of ML.
Supervised ML
Supervised ML uses human-labeled data of both inputs and correct outputs to train computer algorithms to make predictions.
Let’s use an example: say you want to teach an algorithm to recognize dog breeds. First, you need to find a big dataset with a lot of pictures of dogs (generally not hard on the internet). These ‘inputs’ might include different breeds of dogs as puppies, old dogs, three-legged dogs, and maybe even dogs wearing funny hats. To train the algorithm, you’d need to feed it the correct name of the breed (the ‘output’) along with each photo. This is how the machine ‘learns.’ Then, you’d let the algorithm try to define what set of characteristics belongs to each dog based on the labeled outputs.
You can then test the model by showing it a dog picture and asking it to guess what breed it is. If the model provides an incorrect answer, you can continue training it and adjusting its parameters with more examples to improve its accuracy and minimize errors.
Within supervised learning, there are generally two types of variables:
- Categorical: If the variable is dichotomous (such as yes/no, dog/not dog, etc.) and we want to predict the categories from these features, the process is known as classification. Common classification algorithms include logistic regression, decision trees, random forests, and k-nearest neighbors (KNN).
- Continuous: If the outcome variable is continuous (such as age, height, etc.), and we want to make predictions from these features, the process is known as regression. Common regression algorithms include linear regression, ridge regression, and lasso regression.2
Unsupervised ML
Unsupervised ML uses unlabeled data to discover patterns without any explicit guidance or instruction.
Let’s go back to our example of someone searching for pictures of dogs. Unsupervised learning is often used in recommendation engines, which usually have a lot of data about us. The machine may start to learn that users with certain characteristics (maybe certain personality traits, activity levels, hair color, etc.) prefer looking at certain types of dogs, and then will begin recommending people images of the types of dogs they most enjoy (have you ever noticed that people tend to look a lot like their dogs?). Even though we didn’t explicitly give the program the instructions that ‘people who like to hike and have curly hair like seeing pictures of Labradoodles,’ the algorithm may have noticed a pattern like this, even if we don’t know or understand why certain variables are associated.
Reinforcement Learning
Reinforcement learning uses trial-and-error learning with rewards and punishments to help a machine learn what the optimal outcome is.
A common example of reinforcement learning is teaching a machine to play chess. The more games the machine plays, the more opportunities it will have to receive a ‘punishment’ (loss) for bad moves and a ‘reward’ (win) for good moves, over time learning what the most strategic moves and responses are.3
About the Author
Annika Steele
Annika completed her Masters at the London School of Economics in an interdisciplinary program combining behavioral science, behavioral economics, social psychology, and sustainability. Professionally, she’s applied data-driven insights in project management, consulting, data analytics, and policy proposal. Passionate about the power of psychology to influence an array of social systems, her research has looked at reproductive health, animal welfare, and perfectionism in female distance runners.