Introduction to Unsupervised Learning

Date: 03 July 2019

Reading time: 3 min. read

This is part 3 of our introduction to machine learning. If you did not read the first two parts, it might make sense to catch up: Part 1: But, what is machine learning actually? Part 2: Introduction to supervised learning

Last week, we introduced supervised learning, in which the data handed to an algorithm includes the desired solutions, so-called labels. In unsupervised learning, the dataset does not include these labels, it is therefore unlabeled. Basically, the system is trying to learn without having a teacher that knows all answers.

Unsupervised learning is often used to find the underlying structure in a dataset, summarising it and representing it in a comprehensible format. This can be achieved by clustering, association rule learning or dimensionality reduction. Another task for unsupervised learning is anomaly and novelty detection.

Clustering - Let's assume that you run your own webshop and you would like to know more about your visitors. However, your dataset from your analytics tool is too large to go through by hand. A clustering algorithm can help you to detect groups of similar visitors. The algorithm might find a group (cluster) that is includes visitors that are male, between 30 and 40 years old and visiting your shop during the weekend to buy outdoor equipment. Depending on the algorithm used, these groups are then subdivided into smaller subgroups (hierarchical clustering). By knowing about these groups, you can create better advertising that directly speaks to these groups and can increase your revenue. Common clustering algorithms are K-Means, DBSCAN or Hierarchical Cluster Analysis (HCA).

Anomaly detection - Predictive maintenance is becoming increasingly popular in the manufacturing industry. This means that machines are equipped with sensors that constantly monitor specific values (like temperature or pressure) that, when combined, give a clear picture of the machine's health. When an algorithm detects unusual changes/developments that could lead to a failure, it can preemptively notify a maintenance engineer. This can save a significant amount of time and money when used right. One of these algorithms can be an anomaly detection algorithm. In the case of predictive maintenance, the algorithm looks at a stream of datapoints from a sensor and can detect whether a new instance is within an expected range. An anomaly or repeating instances of this anomaly could mean that there are some machine defects that require being checked. To train such a model well, it is important to have a dataset that includes mostly normal instances (not anomalies). That way, the algorithm learns the normal behaviour and range (light blue area in the graph) and can better detect when a new instance is out of the expected bounds. Common algorithms here are a One-class SVM or an Isolation Forest algorithm.

Association rule learning - The outcomes of association rule learning are the reason why you get the “others also bought…” or “you might also be interested in…” section on modern webshops. These algorithms take a set of historic data, like the purchase history for every customer, and finds correlations between them. A correlation could be that 90% of the people that shop for a new phone also buy a phone case. Common algorithms for association rule learning are Apriori or Eclat.

Dimensionality reduction - Another common task in which unsupervised learning is used is dimensionality reduction. The goal here is to reduce the complexity of a data set without losing too much information in the process. This could be achieved by finding correlation between features and merging them into a feature that expresses both (feature extraction). Common algorithms are Principal Component Analysis (PCA) or Locally-Linear Embedding (LLE).

Next week, we will dive deeper into the hot topic of deep learning. So, make sure to subscribe to our LinkedIn page to get notified about new articles.

Author: Jonas Weidner

Co-Founder and CTO

Jonas has a broad technical background in Mechanical Engineering, Industrial Design and Software Development.