Most lists of machine learning models read like a glossary: a name, a vague sentence, on to the next one. This one gives you the same four facts for each model: what it does, a real product or problem it powers, how people score it, and when to reach for it instead of something else. Fifteen models, grouped by the task they solve, so no model shows up twice.
TL;DR
- Predicting a number: linear regression, gradient boosting.
- Predicting a category: logistic regression, decision tree, random forest, naive Bayes, support vector machine, k-nearest neighbors.
- Finding structure without labels: k-means, PCA, isolation forest.
- Images, text, and generation: convolutional neural networks, transformers, diffusion models.
- Learning by trial and error: Q-learning and deep reinforcement learning.
- Default advice: on spreadsheet-style data, start with a linear or logistic baseline and a gradient-boosted model. Deep learning earns its cost on images, audio, and text.
Table of contents
- How machine learning models are grouped
- Examples of machine learning models for regression
- Classification models
- Unsupervised models: clustering, compression, anomalies
- Deep learning models
- Reinforcement learning
- Comparison table
- How to choose a model
- Try two of them in scikit-learn
How machine learning models are grouped

A model is a function with adjustable settings. Training adjusts those settings until the function’s outputs match the data. What differs between models is the shape of the function and what kind of data you hand it.
The most common grouping is by how the model learns:
- Supervised learning trains on labeled examples: house prices paired with house features, emails paired with “spam” or “not spam.” Regression (predict a number) and classification (predict a category) both live here.
- Unsupervised learning gets no labels and looks for structure on its own, such as customer groups or unusual records.
- Reinforcement learning has no dataset at all. An agent acts, receives rewards, and adjusts.
Deep learning cuts across all three. It describes the architecture (many-layered neural networks), not the learning style. The sections below are organized by task, with deep learning gathered in one place because those models share the same hardware and data demands.
Examples of machine learning models for regression
Regression models output a continuous number: a price, a temperature, a delivery time. The usual score is RMSE (root mean squared error), which tells you the typical size of a miss in the original units.
1. Linear regression
What it does: Fits a straight line (or plane, in many dimensions) through the data by minimizing squared error. Each input gets a coefficient you can read directly: “each extra bedroom adds about this much.”
Real-world use: Price estimates, sales forecasts, and the first-pass analysis in nearly every economics and epidemiology paper.
Score it with: RMSE and R², the share of variance the model explains.
Pick it when: You have a small or medium dataset, the relationships are roughly proportional, and you need to explain the result to someone who will challenge it. It fails quietly when the true relationship curves, so plot the residuals.
2. Gradient boosting (XGBoost, LightGBM)
What it does: Builds hundreds of small decision trees one after another, where each new tree is trained to fix the errors the previous ones left behind. The approach was popularized in practice by XGBoost, which became a staple of winning entries in Kaggle tabular-data competitions. LightGBM, from Microsoft, is the other widely used implementation.
Real-world use: Demand forecasting, ad click prediction, credit risk scoring. It handles both regression and classification, but it is listed here because tabular number-prediction is where it dominates.
Score it with: RMSE for numbers, AUC or log loss if you use it for categories.
Pick it when: Your data is a table with mixed column types and missing values, and accuracy matters more than a readable formula. Most competitors in this space skip it, and that’s a mistake: on tabular data it often beats neural networks.
Classification models
Classifiers assign a label. Binary classifiers say yes or no; multiclass classifiers pick from a list. Accuracy is the obvious score and often the wrong one. If 1% of transactions are fraud, a model that always says “not fraud” is 99% accurate and worthless, so look at precision, recall, F1, or AUC instead.
3. Logistic regression
What it does: Despite the name, it classifies. It takes a weighted sum of the inputs and squeezes it through an S-shaped curve to get a probability between 0 and 1.
Real-world use: Credit scoring, medical risk scores, and predicting whether a user will click or churn.
Score it with: AUC, log loss, and precision/recall at the cutoff you choose.
Pick it when: You want a fast, calibrated baseline with coefficients you can defend. If a fancier model can’t beat it clearly, ship this one.
4. Decision tree
What it does: Asks a sequence of yes/no questions about the features (“income above X? age below Y?”) and ends in a prediction at each leaf. You can print the tree and read it.
Real-world use: Loan approval rules, triage flowcharts, and any setting where a human must audit the logic.
Score it with: Accuracy or F1 on held-out data, plus tree depth as a check on overfitting.
Pick it when: Interpretability beats accuracy. A single deep tree memorizes training data, so cap its depth or move on to the next entry.
5. Random forest
What it does: Trains many decision trees on random slices of the data and features, then takes a vote. Averaging cancels out each tree’s idiosyncratic mistakes. The method comes from Leo Breiman’s 2001 paper, and it’s still one of the most reliable defaults in the field.
Real-world use: Fraud screening, species identification from sensor data, and gene-expression classification in biology.
Score it with: AUC or F1, plus the out-of-bag error it computes for free.
Pick it when: You want strong accuracy with almost no tuning and don’t need a single readable rule. It is slower and bulkier than one tree, and it can’t extrapolate beyond the range of its training data.
6. Naive Bayes
What it does: Applies Bayes’ theorem while assuming every feature is independent of the others. That assumption is false for nearly all real data, and the model works anyway. Training is just counting.
Real-world use: Spam filtering was its breakout job, and it is still a standard baseline for sorting text into topics.
Score it with: Precision and recall. For spam, a false positive (a real email in the junk folder) costs far more than a miss.
Pick it when: You have little data, need an answer in milliseconds, or want a text-classification baseline in five lines of code.
7. Support vector machine (SVM)
What it does: Finds the boundary that separates two classes with the widest possible margin. With a kernel function, it can bend that boundary into curves without explicitly computing the extra dimensions.
Real-world use: Handwritten digit recognition, text categorization, and classifying proteins and gene data, where there are far more features than samples.
Score it with: F1 or AUC, using cross-validation to tune the margin and kernel settings.
Pick it when: You have a few thousand labeled rows and many features. Training time grows steeply with row count, so it is a poor fit for millions of records.
8. k-nearest neighbors (k-NN)
What it does: Stores the training data and, for a new point, finds the k most similar stored points and copies their majority label. There is no training step, only a lookup.
Real-world use: Simple recommendation systems (“people whose ratings look like yours also liked…”), and anomaly checks based on distance.
Score it with: Accuracy or F1, with k chosen by cross-validation.
Pick it when: The dataset is small and distance means something. Scale your features first, or one column measured in thousands will drown out the rest.
Unsupervised models: clustering, compression, anomalies
These models receive no labels. You can’t compute accuracy against a right answer, so scoring leans on internal measures and on whether the output is useful to a person.
9. k-means

What it does: Splits data into k groups by repeatedly assigning each point to its nearest group center and moving the center to the average of its members, until nothing changes.
Real-world use: Customer segmentation for marketing, color quantization in image compression, and grouping documents by topic.
Score it with: Silhouette score, which measures how tight and separate the clusters are, and the “elbow” in a plot of within-cluster error against k.
Pick it when: You expect roughly round, similarly sized groups and can guess how many. It breaks on elongated or nested clusters.
10. Principal component analysis (PCA)
What it does: Rotates the data onto new axes ordered by how much variation they capture, so you can keep the first few and drop the rest. Fifty correlated columns often compress to five or ten with little loss.
Real-world use: Visualizing high-dimensional data in two dimensions, denoising images, and shrinking genomic data before further modeling.
Score it with: Explained variance ratio: how much of the original spread the kept components retain.
Pick it when: You have many correlated features and need fewer, or you want a quick look at whether your data has any structure. The new axes are blends of the original columns, so they are harder to explain.
11. Isolation forest
What it does: Builds random trees that split the data at random points. Unusual records are isolated in fewer splits than ordinary ones, so a short path through the trees signals an anomaly.
Real-world use: Detecting fraudulent card transactions, failing machines from sensor logs, and network intrusions.
Score it with: Precision and recall at a chosen alert rate, checked against whatever confirmed anomalies you have.
Pick it when: Anomalies are rare, you have few or no labeled examples of them, and you need something that scales to large tables.
Deep learning models
Deep learning models stack many layers of simple units and learn their own features from raw input, such as pixels or characters. That removes the manual feature engineering that older methods needed, at the cost of more data, more compute, and less transparency. As LeCun, Bengio, and Hinton’s overview in Nature puts it, these methods discover structure in large datasets by adjusting internal parameters through backpropagation.
12. Convolutional neural network (CNN)
What it does: Slides small learned filters across an image to detect edges, then textures, then parts, then whole objects. Reusing the same filter everywhere keeps the parameter count manageable.
Real-world use: Reading digits on bank checks (an early CNN, LeNet, did this in the 1990s), medical image screening, face unlock, and the vision systems in driver-assistance cameras.
Score it with: Top-1 and top-5 accuracy for classification, or mean average precision for object detection.
Pick it when: The input is an image or something image-like, such as a spectrogram. You’ll want a GPU and thousands of labeled images, or a pretrained network you fine-tune on a few hundred.
13. Transformers and large language models
What it does: Uses an attention mechanism that lets every token in a sequence weigh its relevance to every other token, and processes the whole sequence in parallel rather than word by word. The architecture was introduced in the 2017 paper “Attention Is All You Need”. Large language models such as ChatGPT, Gemini, and Claude are transformers trained on enormous text collections to predict the next token.
Real-world use: Chat assistants, machine translation, code completion, document search, and protein structure prediction.
Score it with: Perplexity during training (how surprised the model is by real text), then task benchmarks and human evaluation, because fluent output can still be wrong.
Pick it when: The data is language, code, or any long sequence. For a small, well-defined text task, a fine-tuned small transformer or even naive Bayes may be cheaper and good enough.
14. Diffusion models
What it does: Learns to remove noise. During training, real images are corrupted with noise in many small steps, and the network learns to reverse each step. To generate, it starts from pure noise and denoises its way to a new image. The approach took off after Ho, Jain, and Abbeel’s 2020 paper.
Real-world use: Text-to-image tools such as Stable Diffusion and DALL-E, plus image editing, upscaling, and audio and video generation.
Score it with: Fréchet Inception Distance (FID), which compares generated images to real ones statistically, supported by human preference ratings.
Pick it when: You need to create new images or other rich media, not label existing ones. Generation is slow because it runs many denoising steps.
Reinforcement learning
There’s no labeled dataset here. An agent takes actions in an environment, collects rewards, and learns which behavior pays off over time.
15. Q-learning and deep Q-networks
What it does: Q-learning keeps a table of how valuable each action is in each situation and updates it from experience. A deep Q-network replaces the table with a neural network so it can handle situations too numerous to list. DeepMind’s 2015 Nature paper showed one network learning to play dozens of Atari games from raw pixels.
Real-world use: Game-playing systems, robot control, and resource scheduling such as data-center cooling. Related methods trained AlphaGo to beat a world champion at Go in 2016.
Score it with: Cumulative reward per episode, averaged over many runs, since a single run can be luck.
Pick it when: You can run a cheap, safe simulator where the agent can fail millions of times. Without one, reinforcement learning is usually the wrong tool, and a supervised model on logged data will serve you better.
Comparison table
| Model | Data needs | Interpretability | Typical use |
|---|---|---|---|
| Linear regression | Small to medium | High | Price and trend prediction |
| Gradient boosting | Medium to large | Low to medium | Tabular forecasting and scoring |
| Logistic regression | Small to medium | High | Risk scores, churn, click prediction |
| Decision tree | Small to medium | High | Auditable rules |
| Random forest | Medium | Medium | General-purpose classification |
| Naive Bayes | Very small | Medium | Spam and text baselines |
| SVM | Small to medium | Low | High-dimensional classification |
| k-NN | Small | Medium | Recommendations, similarity lookup |
| k-means | Medium | Medium | Customer segmentation |
| PCA | Medium | Medium | Compression, visualization |
| Isolation forest | Medium to large | Low | Fraud and fault detection |
| CNN | Large (or pretrained) | Low | Image tasks |
| Transformer / LLM | Very large (or pretrained) | Very low | Language, code, sequences |
| Diffusion model | Very large | Very low | Image and media generation |
| Q-learning / DQN | Simulator needed | Low | Games, control, scheduling |
How to choose a model
Work through these questions in order.
- What is the output? A number points to regression, a label to classification, groups or outliers to unsupervised methods, a sequence of decisions to reinforcement learning.
- What does the input look like? Rows and columns: start with the classical models. Images: CNNs. Text or long sequences: transformers.
- How much labeled data do you have? Hundreds of rows rule out deep learning from scratch. Naive Bayes, logistic regression, and SVMs do well with little. If you have millions of examples, neural networks become an option.
- Who needs to understand the result? If a regulator, doctor, or customer will ask why, favor linear models and single trees, or pair a complex model with an explanation tool.
- What does a mistake cost? This picks your metric. Missing a tumor and flagging a harmless email are different errors, and precision, recall, and AUC let you weigh them. Accuracy hides the difference.
- Start simple. Fit a linear or logistic baseline first. A more complex model has to beat it on held-out data using cross-validation, or it has not earned its place.
Following that order is the most dependable way to pick among these examples of machine learning models: the simplest model that meets your metric wins, and the 15 above cover nearly every case you’ll meet before you need anything exotic.
Try two of them in scikit-learn
The snippet below compares logistic regression with a random forest on a built-in medical dataset, using five-fold cross-validation and AUC. Both models score close together, which is the usual outcome on small, clean tables and a good argument for the simpler one.
“`python from sklearn.datasets import load_breast_cancer from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.model_selection import cross_val_score from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler
X, y = load_breast_cancer(return_X_y=True)
models = { “logistic regression”: make_pipeline( StandardScaler(), LogisticRegression(max_iter=1000) ), “random forest”: RandomForestClassifier(n_estimators=300, random_state=0), }
for name, model in models.items(): scores = cross_val_score(model, X, y, cv=5, scoring=”roc_auc”) print(f”{name}: {scores.mean():.3f}”) “`
The same pattern works for unsupervised models. This groups points into three clusters and reports how well separated they are:
“`python from sklearn.cluster import KMeans from sklearn.datasets import make_blobs from sklearn.metrics import silhouette_score
X, _ = make_blobs(n_samples=500, centers=3, random_state=0) labels = KMeans(n_clusters=3, n_init=10, random_state=0).fit_predict(X) print(f”silhouette: {silhouette_score(X, labels):.2f}”) “`
Swap in GradientBoostingClassifier, SVC, or IsolationForest from the same library and the workflow stays identical: fit, score on data the model hasn’t seen, compare.

