Skip to main content

What Is Unsupervised Learning?

What Is Unsupervised Learning?

Unsupervised learning is a type of machine learning (ML) training method that learns from the data in an unlabeled data set without human supervision or intervention. Unsupervised machine learning models discover patterns and insights within the data without explicit instruction. For example, an unsupervised learning task can categorize a document archive. Training automatically generates category tags such as ‘press release,’ ‘contract,’ and ‘financial documents,’ Once trained, the unsupervised learning model also automatically categorizes incoming new documents.

What are the applications of unsupervised learning?

Unsupervised learning techniques are used to identify patterns or relationships within vast datasets. For example

  • Fraud detection involves learning normal transaction speeds, amounts, and types to determine when fraud might be occurring and stop transactions.

  • Medical imaging analysis involves learning typical medical structures to identify where there are aberrations.

  • Intrusion detection is achieved by learning normal network traffic patterns and identifying anomalies.

  • Customer segmentation involves learning which type of customer group a customer falls into for different deals.

Unsupervised machine learning algorithms also have applications in genetic analysis. It learns association patterns to see which conditions often occur together based on genetic encoding. There are near-infinite applications of unsupervised learning, as you can apply classification to solve various problems in different domains.

What are the types of unsupervised learning?

Here are some of the most common unsupervised learning methods.

Clustering

Clustering unsupervised learning algorithms identify data from different classifications by the similarity between data points, shown within graphs by the distance between points.

Hard clustering

Hard clustering, or exclusive clustering, is an unsupervised learning method in which each data point belongs to only one cluster. This method is used for data where boundaries are distinct, for example, identifying which type of fruit is in an image of a single fruit. The K means clustering algorithm and hierarchical clustering are specific hard clustering methods.

Soft clustering

Soft clustering, or overlapping clustering, is an unsupervised learning method in which data can fit into multiple groups. The algorithm will output the degree to which a data point fits in specific groups. For instance, The Fuzzy C-Means and Fuzzy clustering by Local Approximation of MEmberships (FLAME) unsupervised learning algorithms are both soft clustering methods.

Probabilistic clustering

Probabilistic clustering, or distribution-based clustering, is an unsupervised learning method in which probabilities represent the chance that a data point belongs to a specific cluster. Probabilistic clustering can be either exclusive or overlapping. For example, within a customer segmentation for supermarket shopping behavior analysis, a person might fall into the 35% high-spending, 60% medium-spending, and 15% low-spending categories. Gaussian clustering methods, such as Gaussian Mixture Models (GMM), are a type of probabilistic clustering where the data follows Gaussian distributions.

Association rule mining

Association rule mining unsupervised learning methods find interesting relationship patterns between variables in the data. The most famous association rule mining application is market basket analysis, which finds which items are commonly purchased together in the grocery store, such as pasta sauce and pasta. The Apriori, Eclat, and Frequent Pattern Growth (FPG) unsupervised learning algorithms are all types of association rule mining.

Density estimation

The density estimation machine learning method is where the model guesses an underlying probability distribution for the dataset. For example, sensor data such as temperature, humidity, and amount of light could be used to determine whether a self-operational greenhouse is running as expected or requires maintenance. Kernel Density Estimation is an example of a specific density estimation algorithm.

Anomaly detection

A dataset can be evaluated using anomaly detection to find outliers in the data that don’t quite fit in. For example, surveillance video footage could be used to identify probable theft incidents. Types of anomaly detection algorithms include Isolation Forests and One-Class Support Vector Machines.

Dimensionality reduction

Dimensionality reduction is used before other unsupervised learning techniques. This is when “noise”—or extra unnecessary variables—is removed from the data during preprocessing to reduce model training overheads.

What are generative models in unsupervised learning?

In unsupervised machine learning, generative AI models are algorithms that learn the underlying patterns and structures of unlabeled data to generate new data instances that resemble the original data. These models are called generative because they can create or generate data points after learning from a dataset.

Examples of generative models used in unsupervised machine learning include

GAN

Generative Adversarial Networks (GANs) involve two neural networks, a generator and a discriminator, which are trained simultaneously. The generator tries to produce data that is indistinguishable from real data, while the discriminator attempts to distinguish generated data from real data. This adversarial process improves the quality and realism of the generated data.

VAE

Variational Autoencoders (VAEs) are based on autoencoders, which are neural networks trained to reproduce their input at the output. VAEs represent input data as a distribution over a latent space. They can generate new data by sampling from this latent space.

Autoregressive models

Auto-regressive models like PixelRNN and PixelCNN generate data one piece at a time in a specified order (e.g., pixel-by-pixel for images), conditioning each piece on the pieces generated before it.

Normalizing flows

Normalizing flows learn transformations that map data to a simpler, typically Gaussian, distribution. They can generate new data instances from simple noise distributions by reversing these transformations.

What is the difference between unsupervised and supervised learning?

Supervised learning is when the machine learning model is trained on input data points that have already been labeled so that new incoming data is then labeled in the same way. For instance, predicting credit approval uses a dataset with features like credit score, income, employment history, and labels indicating whether the credit was approved or denied. By plugging in these details in a new case, there’s an automatic assumption of credit approval or denial. Conversely, unsupervised learning models are trained on unlabeled data.

Unsupervised machine learning methods are typically more difficult to implement than supervised learning methods. With supervised learning methods, you already point the algorithm in the right direction; when using unsupervised learning, there is no direction other than the algorithm itself. Unsupervised learning must identify patterns from the input data on its own.

Sometimes, only some of a dataset has been labeled or is able to be labeled manually. In this case, you can use semi-supervised learning. First, you can train the model on the labeled input data using supervised learning, and then you can train the remaining unlabeled data using unsupervised learning.

For more information, explore the difference between supervised and unsupervised learning.

What are the challenges in unsupervised machine learning?

We give some challenges below.

Model selection

In any machine learning task, picking the right algorithm or model is difficult. Even if you know you need a hard clustering model, choosing the best-fit unsupervised learning algorithm for the task might be difficult.

Training data size

Accurately training unsupervised learning models requires a large amount of training data, particularly for generative unsupervised learning models. Capturing this training data and ensuring it is clean and correct is challenging.

Processing power

Unsupervised learning model training can take a long time and involve significant processing power. This processing power may need to be outsourced, such as running Amazon EC2 P3 Instances for fast, on-demand, unsupervised learning model training.

A changing dataset

When data changes or grows over time, and the unsupervised learning model is not augmented with techniques such as fine-tuning or retrieval augmented generation (RAG), its prediction accuracy can start to fail.

How can AWS help?

Amazon SageMaker is a fully managed service to prepare data and build, train, and deploy machine learning (ML) models for any use case with fully managed infrastructure, tools, and workflows. It provides several built-in algorithms that can be used for various unsupervised learning tasks, such as clustering, dimension reduction, pattern recognition, and anomaly detection. For example:

  • IP Insights captures associations between IPv4 addresses and various entities, such as user IDs or account numbers.

  • K-Means algorithm finds discrete groupings within data, where members of a group are as similar as possible to one another and as different as possible from members of other groups.

  • Principal Component Analysis (PCA) algorithm reduces the dimensionality within a dataset by projecting data points onto the first few principal components.

  • Random Cut Forest (RCF) Algorithm detects anomalous data points within a data set that diverge from otherwise well-structured or patterned data.

Amazon Bedrock is a fully managed service. You can use it to access foundation models (FMs) or trained deep neural networks from Amazon and leading artificial intelligence (AI) startups. These FMs are available through APIs—so you can choose from various options to find the best model for your needs. You can use these models in your own GAN applications. With Amazon Bedrock, you can quickly develop and deploy scalable, reliable, and secure generative AI applications. And you don’t have to manage infrastructure.

Get started with unsupervised learning on AWS by creating a free account today.

Browse all cloud computing concepts

Browse all cloud computing concepts content here:

Loading
Loading
Loading
Loading
Loading

Did you find what you were looking for today?

Let us know so we can improve the quality of the content on our pages