Welcome to the Unsupervised Learning section of the Algorithm Cheatsheets repository!
Unsupervised Learning is a subcategory of Machine Learning where algorithms are trained on unlabeled datasets. Unlike Supervised Learning, there is no "correct answer" or target variable provided to the model. Instead, the algorithm's job is to act as a detective: exploring the data to discover hidden structures, patterns, and relationships on its own.
Unsupervised Learning algorithms generally fall into three main categories based on the type of structure they are trying to uncover:
- Clustering: Grouping unclassified data points into distinct clusters based on their similarities (e.g., Customer Segmentation).
- Dimensionality Reduction: Compressing data from a high-dimensional space into a lower-dimensional space while keeping the meaningful properties of the original data (e.g., Image Compression, Feature Extraction).
- Association Rule Mining: Discovering interesting relations and "if-then" rules between variables in large databases (e.g., Market Basket Analysis).
Here is what you will find in this directory. Each algorithm includes a theoretical Markdown cheatsheet and an accompanying Jupyter Notebook with Python code (scikit-learn, scipy, mlxtend, etc.).
-
K-Means Clustering: Cheatsheet
- Best for: Fast, centroid-based grouping when you roughly know how many clusters you want.
-
Hierarchical Clustering: Cheatsheet
-
Best for: Discovering nested structures and visualizing taxonomy via a dendrogram (without guessing
$k$ ).
-
Best for: Discovering nested structures and visualizing taxonomy via a dendrogram (without guessing
-
DBSCAN: Cheatsheet
- Best for: Finding arbitrary-shaped clusters and automatically detecting outliers/noise in dense spatial data.
- Principal Component Analysis (PCA): Cheatsheet
- Best for: Squashing highly correlated features into a few principal components to speed up training and visualize complex data.
- Singular Value Decomposition (SVD): Cheatsheet
- Best for: Matrix factorization, handling sparse text data, and building the foundation of Recommendation Systems.
- Apriori Algorithm: Cheatsheet
- Best for: Market Basket Analysis and finding out which items are frequently bought or consumed together.
- For Theory: Read the
.mdfiles. They contain the mathematical intuition, pros and cons, evaluation metrics, and real-world use cases. - For Practice: Open the
code/folder to see how to import, train, and evaluate these models using standard Python libraries.
Back to the Main Repository README
