The Different Types of Machine Learning (ML)

Ahmed
7 min readOct 9, 2022

--

Machine Learning (ML) is an exciting field within the Artificial Intelligence (AI) space that focuses on creating intelligent programs by using data. According to market research, it is expected to grow 20%+ annually. Moreover, many companies, institutions, and start-ups are turning to ML to tackle some of the most complex problems (such as protein folding, image / video generation, and self-driving cars).

Photo by Kevin Ku on Unsplash

Within the discipline of ML, there is three distinct types of ML: supervised learning, unsupervised learning, and reinforcement learning. In this article, we discuss what these different types of ML are and their distinctions.

ML Overview

Before diving into the types of ML, we’ll define how ML works in general and then explain why there are distinct types. Machine learning is the process of using data to make rules and decisions. The high-level overview of the machine learning process is sourcing the data, utilizing it in algorithms / models that leverage data to inform its output (often called training), and deploying it on new data (often called inference).

At the core of any machine learning system is the data — it informs the steps in the process, the models we use, and the quality of said model(s). Data can come in many forms which ultimately impacts how we go about the machine learning process. Depending on the data, the training and inference steps can vary significantly. Thus, the distinct types of machine learning arise due to the different types of data we might encounter and the distinct set of techniques / algorithms we employ to make the data useful.

Supervised Learning

Supervised Learning refers to machine learning in the context of labeled data. Within this type of ML, our data has both features (i.e., variables, quantities of interest, measurements, etc.) and labels (i.e., what we want our model to determine / predict). For example, we might want to build a machine learning classifier that detects if a patient has cancer from an X-ray image. In the supervised context, our dataset will have patient’s X-ray images (these are the features) and diagnosis (this is the label — we want the model to determine this based on the X-ray). Another example is determining the prices of homes based on property attributes. In the supervised context, our dataset will have house details, such as number of rooms, square foot, furnished or not, etc. (these are the features) and the house price (this is the label).

With supervised learning, the machine learning model / algorithm will take in the features and output what the label should be. Since we have labels, we can supervise the model and determine if it was correct or not. We can then pass that information back to the model so it can iterate and improve its performance. Furthermore, we can constantly evaluate the machine learning model as we have the correct answers to compare with the model output. Thus, the techniques within this type of ML will typically focus on optimizing some metric of closeness between the ML output and true answer / data point.

Some popular models / algorithms used in supervised learning are linear regression, logistic regression, KNN, decision trees, random forests, and neural networks.

Unsupervised Learning

Unsupervised learning is machine learning without labels — we only have features. Referring to our examples from the earlier section, in the unsupervised context, we’d only have data on the X-ray with no diagnosis and only house details with no prices. Typically, unsupervised machine learning problems are harder since there’s no direct way of checking if the decisions made by the machine learning program is correct.

Often, the types of techniques in unsupervised learning revolve around data reduction and clustering. The goal with unsupervised learning is to find the patterns and groups in the data. Returning to the X-ray data, clustering the dataset might reveal groups of patients, with each group representing different levels of severity. For the housing data, grouping the properties can help detect if there are homes that are outliers (i.e., doesn’t fall into any cluster) — those homes could potentially be great investments.

Some popular techniques in unsupervised learning are K-Means, PCA, and hierarchical clustering.

Reinforcement Learning (RL)

Reinforcement learning refers to machine learning where the program learns by collecting data through interacting / making sequential decisions with its environment. In the RL context, the program, which is often called an agent, will interact with its environment and collect observations / data points. Then it will use those data points to make a decision and will receive some amount of (positive or negative) reward. The agent’s goal is to maximize the amount of reward, so it constantly updates its decision making based on past decisions to optimize accordingly.

Reinforcement learning is a common choice for problems where the data is sequential decisions made by the program. For example, for a self-driving car, the data points to assess whether the car is doing well come from the vehicle itself. Each decision the car makes is a data point that can be used to determine its performance. Another example is in robotics where the data on the decisions of the robot previously informs its next set of decisions.

Often, in the RL setting, simulations are used to collect data on decisions and train the program. The program will execute a set of decisions in the simulation and then receive feedback in the form of a reward function (that the practitioner designs to award desired behavior and punished deviations). Then when it goes through the simulation again, it will leverage its past simulations and reward to inform its new set of decisions. This will continue, each time building on all the previous set of decisions, until it’s able to perform well. After which, it will be tested on the real device or physically in the real world.

Some popular techniques in RL are State Action Reward State Action (SARSA), Q-learning, and Deep Q Networks.

Other Types of ML

The ML field is rapidly developing, so the taxonomy of ML is constantly evolving / expanding. Although the three types we discussed cover a lot of breadth within the ML world, there are other types that are emerging, with their own set of application areas, data requirements, and modeling techniques. This section will cover some other types of ML (note: it will not be exhaustive).

  • Semi-supervised learning: this type of ML combines unlabeled datasets with labeled datasets. Unlabeled datasets are difficult to work with and the number of techniques is limited. We can convert an unlabeled dataset into a label dataset and enter the world of supervised learning if we label our data. However, that can be expensive and time-intensive, rendering it infeasible. This is where semi-supervised ML steps in — it tries to combine some labeled data points to improve the results when working with unlabeled data. Often, semi-supervised learning arises when we have a dataset with partial labels or we spend some resources to label some reasonable / feasible portion of an unlabeled dataset.
  • Multimodal learning: this refers to machine learning where the data contains different modalities. For example, the dataset has text, audio, image, sensor data, and demographic features, all of which are different modalities of information. The information and data from an image are vastly different from a text or sensor — an image is 2-dimensional, captures information in space, and is typically several thousands of numbers / pixels of information whereas text / sensors are much smaller in size and have a sequential / time ordering. Currently, we have established methods for working with each modality separately, but combining modalities introduces new challenges and model considerations, which is why it’s considered its own type of ML. In terms of where it fits in with the supervised, unsupervised, and RL domains, it spans across all three. With multimodal, you can have the dataset be labeled, unlabeled, or generated via sequential decision making.
  • Federated learning: this refers to machine learning where the model can train on device without needing to separately store the data itself. Traditionally, in ML, the data is stored in a database that the model pulls from. For mobile or device data, that would require transferring the data on device to a database via the cloud. Once the data is in the database, the ML model can (re-)trained from it. In the federated learning context, instead of storing the device data in a separate database, the data stays on the device. The model will be sent via the cloud to the device, from where it will access the data on device, and train on the device. After training, the model is sent back via the cloud to be used elsewhere. With federated learning, the user’s data stays with the user and never leaves the device, ensuring greater user data privacy and security. Some of the challenges of federated learning are limited computation on device (i.e., the device doesn’t have enough computational capability to train a model) and stitching model training across devices (i.e., combining trainings from various devices into one unified model). Similar to multimodal, federated learning can span the supervised, unsupervised, and reinforcement learning domains.

Conclusion

Machine learning (ML) is the field of using data to inform intelligent systems. In this article, we cover three distinct types of ML: supervised learning, where the data is labeled, unsupervised learning, where the data is unlabeled, and reinforcement learning, where the data is sequential decisions.

For more on the topic, check out: The Distinctions Between Artificial Intelligence, Machine Learning, and Deep Learning

--

--