Machine Learning (ML) is a crucial part of artificial intelligence, enabling systems to automatically learn from data.
This Machine Learning Cheatsheet focuses on Unsupervised Learning Algorithms and Reinforcement Learning Algorithms, outlining their descriptions, applications, advantages, and disadvantages in an easy-to-read tabular format.
Table of Contents:
Unsupervised Machine Learning Algorithms
Unsupervised learning helps machines uncover hidden structures in unlabeled datasets.
These algorithms are primarily used for clustering, association, and dimensionality reduction tasks.
| Algorithm | Description | Applications | Advantages | Disadvantages |
|---|---|---|---|---|
| K-Means Clustering | Divides data into K groups based on similarity. | Customer segmentation, image grouping, anomaly detection. | Simple, efficient, and handles large datasets. | Requires predefined cluster number; sensitive to initialization. |
| Hierarchical Clustering | Builds nested clusters either bottom-up or top-down. | Image segmentation, customer grouping, outlier detection. | Reveals data hierarchy, no need to define cluster count. | Computationally expensive for big datasets; sensitive to distance metrics. |
| Principal Component Analysis (PCA) | Reduces dataset dimensions while keeping key features. | Data visualization, feature engineering, noise reduction. | Reveals patterns; efficient for large data. | May lose minor information in the reduction process. |
| Singular Value Decomposition (SVD) | Decomposes matrices into singular values and vectors. | Data compression, recommendation systems, text analysis. | Excellent for feature extraction and dimensionality reduction. | Can be heavy for very large matrices. |
| Independent Component Analysis (ICA) | Identifies independent signals from mixed data. | Speech separation, signal processing, biomedical imaging. | Can separate mixed signals effectively. | Sensitive to initialization and independence assumptions. |
| Gaussian Mixture Model (GMM) | Models data as a combination of multiple Gaussian distributions. | Clustering, density estimation, anomaly detection. | Flexible, handles overlapping data clusters. | Can be computationally expensive; sensitive to initialization. |
| Apriori Algorithm | Finds frequent itemsets and association rules in datasets. | Market basket analysis, recommendation engines. | Useful for discovering item associations. | Inefficient for very large or sparse datasets. |
| t-SNE (t-distributed Stochastic Neighbor Embedding) | Non-linear dimensionality reduction preserving local structure. | Data visualization, clustering exploration. | Excellent visualization for high-dimensional data. | Slow for large datasets; sensitive to parameters. |
| UMAP (Uniform Manifold Approximation and Projection) | Non-linear reduction method maintaining local and global data relationships. | Data visualization, anomaly detection, clustering. | Scalable and preserves structure better than t-SNE. | Requires careful parameter tuning. |
machine learning cheatsheet, unsupervised learning algorithms, reinforcement learning, ml algorithm comparison, ai algorithms list, data science quick guide, machine learning reference table
Reinforcement Learning Algorithms
Reinforcement learning allows an agent to learn through interactions with an environment by performing actions and receiving feedback (rewards or penalties).
It is commonly applied in robotics, gaming, and control systems.
| Algorithm | Description | Applications | Advantages | Disadvantages |
|---|---|---|---|---|
| Q-Learning | Off-policy learning algorithm that learns the optimal action-value function. | Robotics, game AI, control systems. | Simple, effective, and handles complex environments. | Computationally expensive for large state spaces. |
| SARSA (State-Action-Reward-State-Action) | On-policy learning method that updates Q-values based on the agent’s current policy. | Navigation, robotics, adaptive systems. | Works well in stochastic environments. | Balancing exploration and exploitation is challenging. |
| Deep Q-Networks (DQN) | Uses deep neural networks to approximate Q-values in Q-learning. | Self-driving cars, gaming, robotics. | Handles high-dimensional and continuous states effectively. | Requires large training data; needs careful hyperparameter tuning. |
| Policy Gradients | Directly optimizes the policy to maximize total reward. | Robotics, NLP, game AI. | Handles continuous action spaces efficiently. | Can be unstable and sensitive to noise. |
| Actor-Critic | Combines policy-based and value-based learning for stability. | Robotics, dynamic control, simulation environments. | More efficient than pure policy-based methods. | Requires careful balance between exploration and exploitation. |
| Asynchronous Advantage Actor-Critic (A3C) | Parallelized version of Actor-Critic for distributed environments. | Complex robotics, distributed AI systems. | Highly efficient for large-scale learning. | Complex to implement and fine-tune. |
Machine Learning Algorithms – Quick Comparison
| Learning Type | Goal | Common Algorithms | Use Cases |
|---|---|---|---|
| Unsupervised Learning | Discover hidden structures in unlabeled data. | K-Means, PCA, GMM, ICA. | Data clustering, visualization, feature reduction. |
| Reinforcement Learning | Learn through interaction using rewards and penalties. | Q-Learning, DQN, Actor-Critic. | Robotics, gaming, autonomous systems. |
How to Choose the Right Algorithm
- For clustering: Use K-Means or GMM.
- For visualization or dimensionality reduction: Use PCA, t-SNE, or UMAP.
- For decision-making tasks: Reinforcement learning methods like Q-Learning or A3C are best.
- For association mining: Apriori works well for market data.
FAQs – Machine Learning Cheatsheet
Q1: What is the main goal of unsupervised learning?
It helps discover patterns or clusters in unlabeled datasets.
Q2: How does reinforcement learning differ from supervised learning?
Reinforcement learning learns by trial and feedback, while supervised learning uses labeled examples.
Q3: Which algorithm is best for visualization?
t-SNE and UMAP are excellent for reducing high-dimensional data into a 2D or 3D view.
Q4: Is Q-Learning suitable for complex environments?
Yes, though Deep Q-Networks are better for large, complex state-action spaces.
Q5: Can I use PCA and clustering together?
Yes. PCA often precedes clustering to reduce noise and dimensionality.

