In Unsupervised Learning, the model understands the data without any supervision. The techniques applied in this Learning cluster
unlabeled data based on similarities and differences.
This Machine Learning category follows the below working process—
- Collect Unlabeled Data
- Select an Algorithm
- Train the Model on Raw Data
- Group or Transform Data
- Interpret and Use Results
Unsupervised Machine Learning can be broken down into following categories—
- Clustering
- Association rules
- Dimensionality reduction.
Each of these categories consists of models whose
functionality we will discuss in this article
Clustering
These algorithms find the relationship patterns among data
samples and then cluster those samples into groups having similarity based on
features. Most of the industries use clustering models, from airlines to
healthcare and beyond.
- It is also called as Flat Clustering algorithm.
- This algorithm divides the dataset into K clusters based on feature similarity.
- The objective is to group similar data points while keeping different groups separately.
- K-Means Clustering follows the below working process:
a)
Choosing Number of Clusters (k): The
first step is to decide total clusters (k) you want to create. Choosing k is essential for meaningful clustering.
b)
Initial Partitioning: After k is
chosen, the model partitions the data points into k subsets.
c)
Computing Centroids: After the
initial partition, the model determines the centroid for each cluster.
d) Reassigning Points: Each data point is assigned to the cluster whose centroid is nearest, typically with the help of Euclidean distance.
e) Iteration Until Convergence: Steps c) and d) are repeated until the cluster assignments no longer change
Hierarchical Clustering
- Groups similar data points into hierarchy of clusters, allowing us to explore data at multiple levels of granularity.
- The output is represented in the form of a tree called Dendrogram.
- Unlike K-Means, it does not require preselecting the number of clusters.
- Follows the below main approaches—
a)
Agglomerative (Bottom-Up):
> Also called AGNES (Agglomerative Nesting)
> This approach starts with taking all data points
as single clusters and merging them until one cluster is left.
b)
Divisive (Top-Down):
> Also called DIANA (Divisive Analysis)
> All the data points are treated as one big
cluster and the process of clustering involves dividing one big cluster into
various small clusters.
DBSCAN
- DBSCAN, which stands for Density-Based Spatial Clustering of Applications with Noise is a density-based clustering algorithm that groups together data points that are closely packed while marking points in low-density regions as outliers.
- This Clustering method uses 2 important parameters—
a)
Epsilon (ε): The max distance within
which two data points are considered neighbors.
b)
MinPts: The min number of neighboring
points required to form a dense region (cluster).
- DBSCAN algorithm classifies the data points into 3 types—
a)
Core point: Have sufficient number of
neighbors within a given radius.
b)
Border point: Close to the core point
but does not meet the density requirement themselves.
c)
Noise point: Which are isolated and
do not belong to any cluster.
Association Rules
This Learning technique finds relationships, patterns or associations
between variables in large datasets. It is commonly used in Market Basket
Analysis for identifying products that are most frequently purchased.
Apriori Algorithm
- It was introduced by Rakesh Agrawal and Ramakrishnan Srikant in 1994.
- Finds frequent itemsets in a transaction database and generate association rules based on those itemsets.
- This algorithm follows the principle— “If an itemset is frequent, then all its subsets must also be frequent.”
- The key metrics in this algorithm are--
a)
Support: measures how frequently an
item or item-set appears in the dataset relative to the total transactions.
b)
Confidence: measures the likelihood
that item Y is purchased when item X is purchased.
c)
Lift: measures how likely the two items are purchased together compared to random chance.
FP (Frequent Pattern)-Growth Algorithm
- This technique is an improvement to Apriori algorithm, since it efficiently discovers frequent itemsets in transactional databases without generating candidate itemsets.
- FP Tree in this algorithm is a tree data structure created from the transaction data while generating frequent itemsets.
- FP-Growth algorithm works in the following manner:
a)
First, it compresses the input database creating
an FP-tree instance to represent frequent items.
b)
Then, it divides the compressed database into a
set of conditional databases, each associated with one consistent pattern.
c)
Finally, each of these databases are mined separately.
Dimensionality Reduction
Dimensionality reduction reduces the input features in a dataset while preserving
important information. It transforms high-dimensional data into a
lower-dimensional data for simpler representation.
Principal Component Analysis (PCA)
- PCA was introduced by Karl Pearson in 1901 as a statistical method to analyze data variation and relationships.
- This technique transforms large set of correlated features into a smaller set of uncorrelated features called principal components, while retaining as much information as possible.
- The working process of this technique is as follows—
a)
Standardize the data
b)
Compute the covariance matrix
c)
Compute the eigenvectors and eigenvalues of the
covariance matrix
d)
Select the principal components
e)
Project the data onto the new feature space
t-SNE
- t-SNE (T-distributed Stochastic Neighbor Embedding) is a non-linear dimensionality reduction technique used for visualizing high-dimensional data in a lower-dimensional space mainly in 2D or 3D.
- This technique was introduced by Laurens van der Maaten and Geoffrey Hinton in 2008.
- Unlike PCA, which preserves overall variance, t-SNE focuses on preserving the local relationships between data points.
Conclusion
As industries continue to generate large amounts of unlabeled data, Unsupervised Learning becomes increasingly important across various areas such as healthcare, finance, retail, cybersecurity, and manufacturing. The models covered in this article provide the foundation for extracting actionable insights, improving decision-making, and enabling data-driven innovation without relying on manually labeled datasets.