Understand labels, classification, regression and clustering, then learn how to split data and evaluate predictions without being misled by accuracy.
Understand labels, classification, regression and clustering, then learn how to split data and evaluate predictions without being misled by accuracy.
Supervised learning uses examples with known answers to learn a prediction task. Unsupervised learning looks for patterns in data without a supplied answer for each example. Understanding the difference helps you decide what data you need, what a system can reasonably produce and how to check whether it works.
This beginner guide uses a support inbox to explain both approaches. You might train a model to predict which messages are urgent, or explore the inbox to discover recurring themes. Those projects can use the same messages while answering different questions and requiring different kinds of evidence.
If you already know the answer you want a model to predict, supervised learning is often the relevant starting point. Examples include identifying urgent tickets, predicting delivery time or classifying a document. Each training example pairs input information with a target label or value.
If you want to explore structure without predefined answers, an unsupervised method may be useful. You could group similar support requests to see which topics appear repeatedly. The resulting groups still need interpretation; an algorithm does not automatically know which ones represent a meaningful business problem.
Neither category guarantees that the task is feasible. A dataset can have labels that are inconsistent, missing information or records that no longer resemble current conditions. Start with the question and the available evidence before choosing a model family.
The broader machine learning guide introduces the basic training process. Here, the important distinction is what information tells the system that a prediction or discovered pattern is useful.
Imagine 2,000 historical tickets with a label indicating whether each required urgent handling. The input might include the message text and information available when it arrived. The target is the urgency decision you want the model to learn to predict.
During training, the system adjusts its parameters to reduce errors against those labels. That does not mean it memorizes a set of explicit rules you can inspect. It learns statistical relationships that may work well for some kinds of message and poorly for others.
Predicting a category is called classification. Predicting a numeric quantity, such as the number of hours needed to resolve a request, is regression. The supervised reference in scikit-learn describes many methods in both groups, with different assumptions and trade-offs.
Labels are a resource that needs maintenance. If staff disagree about urgency, a model may learn the inconsistency. Write a labeling policy, review disputed examples and consider whether a separate “needs review” outcome is more honest than forcing every message into one of two categories.
Clustering groups records according to the representation and similarity measure you choose. For the inbox, messages represented by embeddings might cluster around delivery problems, password resets and refund requests. You can then inspect examples from each group and decide whether those themes are useful.
The number and shape of clusters depend on the method and its settings. Some approaches require you to choose a number of groups, while others identify dense regions or leave unusual records unassigned. The clustering guide shows why different methods can produce different answers from the same data.
Dimensionality reduction creates a smaller representation of data, sometimes for visualization or preprocessing. A two-dimensional plot can help you explore a large collection, but visual separation is not proof of distinct real-world populations. The projection itself can change apparent distances and boundaries.
Anomaly detection identifies observations that differ from a learned pattern. An unusual ticket might be a new problem, a formatting error or simply a rare legitimate request. Being different is not equivalent to being fraudulent, important or incorrect.
A feature is an input used to describe an example. For a ticket, features might include text, language and the selected product. Avoid using information that becomes available only after the decision you want to predict, such as the eventual escalation outcome.
Numeric scales can matter. A method based on distances may behave differently if one feature ranges from zero to one while another ranges into the millions. The preprocessing reference explains scaling options and why the appropriate transformation depends on the estimator.
Text models need a way to represent language, such as token counts or embeddings. A representation useful for grouping topics may not preserve the precise information required to identify an urgent security issue. Evaluate the representation against the actual task rather than assuming a sophisticated model sees everything relevant.
For unsupervised work, inspect which features determine the groups. Clusters based mostly on message length or language can look orderly while failing to reveal the product problems you intended to study.
Use a training set to fit the model, a validation set to choose settings and an untouched test set for the final assessment. The point is to estimate performance on examples the development process has not already used to make decisions.
The split must reflect how the system will be used. If several messages belong to the same customer or conversation, placing near-identical records in both training and testing can make performance look better than it is. Group related records, or use a time-based split when future behavior is the concern.
Fit preprocessing steps only on the training data, then apply those fitted transformations to validation and test examples. The leakage guidance explains why learning transformations from the complete dataset allows test information to influence development. Even a step that does not read the target labels can leak useful information.
Cross-validation repeats training and validation across several splits to estimate variability. It does not remove the need for an appropriate split strategy or a final independent assessment. Our introduction to AI training provides more context on how data and model parameters interact.
Consider an invented test set of 100 tickets: 90 routine and 10 urgent. A system that labels everything routine is 90% accurate, but it misses every urgent request. That headline number would conceal the failure the project most needs to prevent.
Now suppose a candidate identifies eight urgent tickets, misses two and incorrectly flags five routine tickets. It gets 93 of the 100 decisions right. Its urgent precision is eight out of 13 alerts, about 61.5%, while its urgent recall is eight out of 10 urgent cases, or 80%.
Precision tells you how many alerts are correct; recall tells you how many of the relevant cases the system finds. These measures answer different operational questions. A team might accept more false alerts to miss fewer urgent cases, but it needs enough review capacity to handle them.
You can reproduce the arithmetic with this small Python example. These are illustrative counts, not results from a trained model.
true_positive, false_negative = 8, 2
false_positive, true_negative = 5, 85
accuracy = (true_positive + true_negative) / 100
precision = true_positive / (true_positive + false_positive)
recall = true_positive / (true_positive + false_negative)
print(f"Accuracy: {accuracy:.1%}")
print(f"Urgent precision: {precision:.1%}")
print(f"Urgent recall: {recall:.1%}")
The metrics reference describes other measures for classification and regression. Select metrics based on the consequences of mistakes, and inspect results for important groups and rare cases instead of reporting only one overall score.
Unsupervised learning lacks a ready-made correct label for every result, so evaluation needs a different plan. Inspect representative and borderline examples, check whether groups remain useful under reasonable changes and ask whether they support a real decision.
For the inbox project, a useful result might reveal a recurring delivery issue that staff can confirm in the underlying records. A neatly separated group of long messages is less valuable if it does not help anyone understand or improve support.
You can use a small independently labeled sample to assess whether a clustering result corresponds to themes people recognize. Keep those labels separate from the discovery process when making an independent claim. A group name assigned after inspection is an interpretation, not a fact the algorithm established on its own.
Self-supervised learning constructs training targets from the data itself. A language model predicting a hidden or next token still has a target to compare against, even though a person did not manually label each sentence. This is why “no human labels” does not always mean clustering or purely exploratory learning.
Reinforcement learning is another distinct setup: an agent learns from a reward signal associated with actions and outcomes. Our reward learning guide explains why that differs from copying known answers or grouping similar records.
A practical project can combine these approaches. You might start with pretrained text representations, explore unlabeled tickets, label a useful subset and train a supervised classifier. Keep each stage’s purpose and evaluation clear so a promising pattern does not become an unsupported claim about reliable predictions.
Disclaimer: AIstify is an independent media brand owned and operated by NuvexMedia LLC, publishing news, research, and insights on artificial intelligence, emerging technologies, automation, and related industries. NuvexMedia LLC invests in and collaborates with companies across the AI, technology, software, and digital innovation sectors. These relationships do not influence AIstify’s editorial coverage, and the publication maintains full editorial independence to provide accurate, timely, and objective information. © 2026 NuvexMedia LLC. All rights reserved. This content is for informational purposes only and should not be considered legal, tax, investment, financial, or other professional advice.
OpenAI and Anthropic’s private cryptography findings did not compromise RSA-2048, the FT reports, as governments urge faster encryption upgrades.