Machine Learning (ML) is a subset of artificial intelligence that involves teaching machines how to learn from data and improve their performance over time. Machines can much more quickly identify patterns in data than a human, and that’s what machine learning is all about, identifying patterns.
![](https://storage.googleapis.com/papyrus_images/655cbbfb68b7f3e03782caf1dbcc8b7f.gif)
There are three main types: supervised learning, unsupervised learning, and reinforcement learning.
Supervised Learning
In supervised learning, machines learn from labeled data. That means we feed the algorithm a dataset with input-output pairs, and the algorithm learns to map the inputs to the correct outputs. Once trained, the algorithm can take a new set of inputs and predict the corresponding outputs.
An example of this would be a system that identifies and flags emails as spam. The machine learning algorithm learns to identify patterns associated with spam emails such as certain keywords, the email’s format, the sender’s email address, etc. After training the model can analyze new, never seen emails and predict if it’s spam or not.
![](https://storage.googleapis.com/papyrus_images/a5ee59ed9fe1f0f1e439084a3a6bde48.gif)
The input-output pairs for this would look like:
Input:
Subject: “Claim Your Free Bitcoin”
Body: “You have a free Bitcoin waiting for you. Click here to connect your wallet.”
Sender: spammer@example.com
Recipient: yourname@gmail.com
Output: 1 (spam)
Input:
Subject: “Meeting tomorrow”
Body: “Quick reminder that we have a team meeting tomorrow at 10 am.”
Sender: ceo@example.com
Recipient: yourname@example.com
Output: 0 (not spam)
Unsupervised Learning
Unsupervised learning involves training machines on data where the output is unknown. The algorithm’s job is to find underlying patterns or structures in the data.
Netflix recommendation system is a good example of unsupervised learning, and while Netflix system is far more sophisticated than this example, this serves as a good baseline understanding. Netflix utilizes unsupervised learning to analyze user data such as: viewing history, ratings, and engagement signals to identify patterns and similarities among users and the movies they watch to create user clusters or segments.
Input:
User A: Watched “Stranger Things,” rated it 5 stars
User B: Watched “Narcos” and “Breaking Bad,” rated them 4 stars
User C: Watched “The Crown” and “Downton Abbey,” rated them 5 stars
Output: User Clusters
Cluster 1: Users like sci-fi and thriller genres
Cluster 2: Users like crime and drama genres
Cluster 3: Users like historical and period dramas
Through clusters the Netflix recommendation system can predict a user’s preferences based on the movies watched and rated by other users in the same cluster. For example:
Input:
User D: Watched “Black Mirror”
Output: Recommendation
Recommend “Stranger Things” (based on Cluster 1’s preferences)
The more a user interacts with the platform and generated more data, the system will continually update and refine the clusters, enhancing the accuracy of its recommendations and hopefully preventing this 👇 scenario.
![](https://storage.googleapis.com/papyrus_images/b95b0e87e436ce030a59c570bf0896ad.gif)
Reinforcement Learning
Reinforcement learning is a bit different. It involves an agent learning to make decisions by interacting with its environment. The agent takes actions, gets feedback, and uses that feedback to make better decisions over time.
When applied to chess, the agent (AI player) interacts with the chessboard, receives rewards or penalties based on its moves, and adjusts its strategies to improve its gameplay over time.
![](https://storage.googleapis.com/papyrus_images/811087776ab84e78319e6ac8f8e29b5f.gif)
Input:
Chessboard State: The current state of the chessboard, including the positions of the pieces.
AI Player’s Turn: Whether it’s the AI player’s turn to move or the opponent’s turn.
Output:
Selected Move: The move chosen by the AI player based on the current state and its learned policy.
Throughout the training process, the AI player uses reinforcement learning algorithms to evaluate positions, search for optimal moves, and update its policy based on rewards obtained during gameplay.
![highlight](https://storage.googleapis.com/papyrus_images/482c6b3279a14bf7dc9de48c1275ba18.gif)
![Mercer AI logo](/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fpapyrus_images%2F9b6db2410a205d4bec7bd0849410093d.gif&w=384&q=75)