Machine learning algorithms cheat sheet: 17 side by side
This page puts the most common machine learning algorithms side by side: what type of learning they use, what they are best at, what to watch out for, and a real example. Use it to revise, or to narrow down your choice before you dig deeper.
Everyday analogy
A menu with short notes next to each dish: good for, not good for, popular with. You still taste the dish before deciding, but the menu saves you time.
Example
You need to group shoppers but the groups are oddly shaped and some customers are one-offs. The table points you away from K-means (round groups) and towards DBSCAN, which handles odd shapes and labels one-offs as noise.
| Algorithm | Type | Best for | Watch out for | Real example |
|---|---|---|---|---|
| Linear regression | Supervised | Predicting a number | Outliers and curved patterns | House prices |
| Logistic regression | Supervised | Yes/no decisions | Very curved boundaries | Spam or not spam |
| Decision tree | Supervised | Easy-to-explain decisions | Overfitting, small changes flip it | Loan approval |
| Random forest | Supervised | Accurate, robust predictions | Slower, harder to explain | Fraud detection |
| Gradient boosting | Supervised | Top accuracy on tables of data | Needs careful tuning | Credit scoring |
| SVM | Supervised | Clear separation, many features | Slow on large, noisy data | Face recognition |
| KNN | Supervised | Simple “similar items” lookups | Slow and noisy with many features | Recommendations |
| Naive Bayes | Supervised | Fast text classification | Features that depend on each other | Sentiment analysis |
| K-means | Unsupervised | Splitting into round groups | You must choose K; odd shapes | Customer segments |
| Hierarchical clustering | Unsupervised | A family tree of groups | Very large datasets | Grouping genes or products |
| DBSCAN | Unsupervised | Odd-shaped groups, spotting outliers | Groups of very different density | Map hotspots |
| PCA | Dimensionality reduction | Squeezing many columns into a few | Results are hard to interpret | Image compression |
| Neural network (MLP) | Supervised | Complex patterns | Needs lots of data and tuning | Image classification |
| CNN | Supervised | Images and video | Heavy computing; not for text sequences | Self-driving vision |
| RNN | Supervised | Sequences over time | Long sequences (forgets early parts) | Stock or sensor trends |
| Transformer (BERT, GPT) | Self-supervised | Language, chat, translation | Very costly to train and run | ChatGPT, Claude |
| Autoencoder | Unsupervised | Compression, spotting unusual cases | Can overfit; a black box | Fraud and anomaly alerts |
Three new names in this table: Hierarchical clustering builds a tree of groups inside groups. DBSCAN finds dense crowds of points and calls lonely points noise. Autoencoders learn to squeeze data and rebuild it, so anything they rebuild badly is probably unusual.
Try it yourself
About 10 minQuiz yourself on the table
- Cover the Best for column with paper.
- For 5 algorithms, say out loud what each is best for, then check.
- Pick the two you mixed up and reread their lessons.
What you should see: Quick self-testing fixes the cheat sheet in your memory.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.