Machine learning is not one single technique. The field contains several learning approaches, and the most useful way to distinguish them is to ask what kind of feedback the model receives while it learns.
Does every example have a known answer? Are there no labels at all? Is there a small labeled dataset and a large unlabeled one? Does an agent learn by taking actions and receiving rewards? These questions lead to the major types of machine learning.
The four main types
- Supervised learning: learn from examples with known answers.
- Unsupervised learning: discover structure in data without target labels.
- Semi-supervised and self-supervised learning: learn useful representations when labeled data is limited or created from the data itself.
- Reinforcement learning: learn which actions lead to better long-term rewards.
These categories are useful, but real systems can combine them. A modern language system may first learn from unlabeled text, then be fine-tuned with labeled examples, and finally be improved with feedback from people.
1. Supervised learning
In supervised learning, each training example includes inputs and a target answer. The model learns a relationship between them and uses that relationship to predict the target for new inputs.
For example, a dataset for house-price prediction might include area, number of rooms, location, age, and the final sale price. The input features are known before prediction. The sale price is the target the model learns to estimate.
Regression: predicting numbers
Regression predicts a continuous numeric value. Typical tasks include predicting prices, demand, temperature, delivery time, energy usage, or revenue.
A regression model is evaluated by comparing predicted values with actual values. Common metrics include mean absolute error, mean squared error, and root mean squared error. If being off by ten minutes is easy to understand, mean absolute error may be a useful metric because it reports the average size of the mistake in the original unit.
Classification: predicting categories
Classification predicts one or more categories. A spam filter classifies a message as spam or not spam. A support system might classify a request as billing, technical, account, or another category.
- Binary classification: two possible categories, such as fraud or legitimate.
- Multiclass classification: one category chosen from several, such as a document topic.
- Multilabel classification: several labels can apply to the same example, such as an article tagged with both programming and machine learning.
Common supervised algorithms
- Linear regression: a simple model for relationships between numeric variables.
- Logistic regression: a strong, interpretable baseline for classification.
- Decision trees: a sequence of feature-based decisions that can be easy to inspect.
- Random forests: many decision trees combined to improve stability.
- Gradient boosting: a sequence of small models that correct the errors of earlier models.
- Neural networks: flexible models for complex patterns in images, audio, language, and other data.
2. Unsupervised learning
Unsupervised learning works without a target label for every example. The goal is to find useful structure that was not explicitly provided.
Clustering
Clustering groups similar examples. A retailer might group customers by purchasing behavior. A support team might group tickets by recurring topics before anyone has manually labeled them.
K-means is a popular clustering algorithm that assigns examples to a chosen number of groups. Hierarchical clustering builds a tree of increasingly broad groups. DBSCAN looks for dense regions and can identify noise or outliers.
Clustering does not automatically tell you what a group means. A human still needs to inspect the results, name the segments, and decide whether they support a useful action.
Dimensionality reduction
A dataset may contain hundreds or thousands of features. Dimensionality reduction maps that data into fewer dimensions while trying to preserve important relationships. It is useful for visualization, compression, denoising, and preparing data for another algorithm.
Anomaly detection
Anomaly detection searches for examples that look unusual compared with normal behavior. It can help identify suspicious transactions, failing machinery, unusual network traffic, or accounts behaving differently from their history.
3. Semi-supervised learning
Semi-supervised learning combines a small amount of labeled data with a much larger amount of unlabeled data. This is useful when human labeling is expensive but raw examples are easy to collect.
Imagine a company with one million product images but only twenty thousand carefully labeled images. A semi-supervised method can use the labeled examples to guide learning while also extracting information from the unlabeled images.
The quality of the labeled examples still matters. If the labels are inconsistent or the small labeled set is not representative, the model may learn the wrong structure with more confidence.
4. Self-supervised learning
Self-supervised learning creates a training signal from the data itself. Instead of asking people to label every example, the system hides or transforms part of an example and learns to recover, compare, or predict it.
A language model might predict the next word in a sentence. An image model might learn that two different crops of the same image should have related representations. After this pretraining, the model can be adapted to tasks such as classification, summarization, search, or question answering.
Self-supervised learning is powerful because the world produces enormous amounts of unlabeled text, images, audio, and video. It is also computationally expensive and still requires careful evaluation when adapted to a specific application.
5. Reinforcement learning
Reinforcement learning is based on interaction. An agent observes a state, takes an action, receives a reward or penalty, and moves to a new state. Over time, it learns a policy for choosing actions that lead to better long-term outcomes.
Consider a warehouse robot. It receives positive feedback for delivering an item quickly and negative feedback for collisions, wasted movement, or late delivery. It must explore different choices while learning which decisions produce better results.
Key reinforcement learning concepts
- Agent: the system choosing actions.
- Environment: the world in which the agent acts.
- State: the information available before an action.
- Action: a choice the agent can make.
- Reward: feedback about the result of an action.
- Policy: the strategy that maps states to actions.
Reinforcement learning is useful when decisions happen over time and an action changes what becomes possible next. It is often harder to train than supervised learning because rewards may be delayed, exploration can be risky, and the environment may change.
Deep learning and the learning types
Deep learning is not a fifth type of learning. It describes models built from neural networks with many layers. Deep learning can be used for supervised classification, self-supervised language learning, unsupervised representation learning, and reinforcement learning.
Convolutional networks have been widely used for images. Recurrent models and transformers have been used for sequences, language, and audio. The model architecture and the feedback method answer different questions: the architecture describes how the model represents information, while the learning type describes how it receives training feedback.
How to choose the right type
Begin with the problem and the feedback available.
- Choose supervised learning when you have reliable examples with known answers and need predictions.
- Choose unsupervised learning when you need to explore groups, structure, or unusual examples without labels.
- Choose semi-supervised learning when labels are limited but you have many related unlabeled examples.
- Choose self-supervised learning when the data itself can create a useful prediction task.
- Choose reinforcement learning when an agent can act, observe outcomes, and improve through rewards.
In many business problems, supervised learning is the best place to start because the goal can be measured directly. If labels do not exist, unsupervised analysis can help discover what should be labeled. These approaches can support each other rather than compete.
Evaluation depends on the task
A model is not good simply because it is complex or because one metric looks impressive. Evaluation should reflect the decision the system supports.
- For regression, consider mean absolute error or root mean squared error.
- For classification, consider precision, recall, F1 score, and the confusion matrix.
- For ranking, consider whether the most useful results appear near the top.
- For clustering, inspect stability, separation, and whether the groups lead to useful actions.
- For reinforcement learning, consider long-term reward, safety, and behavior across many environments.
Always evaluate on data that represents real future use. A random split can be misleading when the problem changes over time or when examples from the same user appear in both training and test data.
Common mistakes
- Using clustering when the business actually needs a prediction with a known target.
- Training a supervised model with labels that are inconsistent or based on different rules.
- Ignoring class imbalance, where a rare but important outcome is overwhelmed by common examples.
- Choosing a metric that rewards the wrong behavior.
- Assuming that a model trained in one environment will work forever after deployment.
- Forgetting that human review, product design, and ordinary code are still part of the system.
Final thoughts
The types of machine learning describe the relationship between data, feedback, and decisions. Supervised learning predicts known targets. Unsupervised learning discovers structure. Semi-supervised and self-supervised approaches make better use of unlabeled data. Reinforcement learning improves actions through rewards over time.
Once the type of problem is clear, algorithm selection becomes easier. Start with the simplest approach that can answer the question, evaluate it honestly, and improve only when the evidence says improvement is needed.