In this post, we’ll explore four main types of machine learning: supervised learning, unsupervised learning, reinforcement learning, and deep learning. Each category includes various algorithms suited to solving specific types of problems.
Supervised Learning
Supervised learning involves training a model on a labelled dataset, which means the model is provided with input-output pairs. The primary tasks in supervised learning are regression and classification.
Regression
Regression algorithms predict continuous outcomes based on input features.
-
Linear Regression: Predicts outcomes using a linear relationship between the dependent and independent variables.
- Example: Predicting income based on years of experience.
-
Non-linear Regression: Models relationships where changes in the dependent variable are not proportional to changes in the independent variable.
- Example: Predicting workload based on the number of children.
-
LASSO and Ridge Regression: Employ regularisation techniques to prevent overfitting, which occurs when a model fits the training data too closely and performs poorly on new data.
- Example: Regularisation balances the training and testing error to improve prediction accuracy.
Classification
Classification algorithms predict categorical outcomes.
-
Logistic Regression: Used for binary classification, predicting outcomes as 0 or 1.
- Example: Determining if smoking causes cancer (yes or no).
-
Multi-class Logistic Regression: Extends logistic regression to classify into more than two categories.
- Example: Classifying types of plants.
-
Decision Trees: Predict outcomes by splitting the data into branches based on feature values.
- Example: Planning educational outcomes based on levels of education completed.
-
Random Decision Forests: Improve decision trees by creating multiple trees on random subsets of the data and combining their predictions.
- Example: Ensemble method to reduce overfitting in decision trees.
Deep Learning
Deep learning involves neural networks with multiple layers (deep neural networks) to model complex patterns in data.
-
Convolutional Neural Networks (CNNs): Used primarily for image recognition by breaking down images into smaller pieces and analysing features.
- Example: Classifying images of cars, dogs, or elephants.
-
Recurrent Neural Networks (RNNs): Include connections within nodes to create a memory effect, beneficial for sequential data.
- Example: Natural language processing tasks like language translation or speech recognition.
Unsupervised Learning
Unsupervised learning deals with unlabelled data, aiming to find hidden patterns or intrinsic structures.
Clustering
Clustering algorithms group similar data points together.
-
Support Vector Machines (SVMs): Find the optimal hyperplane that separates data into different clusters.
- Example: Detecting anomalies in network traffic for cybersecurity.
-
K-means Clustering: Partitions data into K distinct clusters by minimising the distance between data points and cluster centroids.
- Example: Market segmentation to identify different customer groups.
Dimensionality Reduction
Reduces the number of features while retaining important information, often used for data visualisation and preprocessing.
Reinforcement Learning
Reinforcement learning trains models through trial and error, learning actions based on rewards.
- Q-learning: An algorithm where the agent learns the value of actions without a predefined model, solely based on reward signals.
- Example: Autonomous robots learning to navigate by receiving feedback on their movements.
Each type of machine learning algorithm is designed to tackle specific problems, making it crucial to choose the right one based on the task. Whether predicting numerical outcomes, classifying data, finding hidden patterns, or learning through interactions, understanding these algorithms helps apply the most effective solution.