On this page
Real-world machine learning problems include spam detection, fraud detection, speech understanding, and product recommendation. Almost all of them fall into a few categories: classification, regression, clustering, and rule extraction.
Key takeaways
- Looking at concrete problems is the best way to understand what machine learning is.
- Each problem is a decision that can be learned from data, such as flagging spam or recommending a product.
- Most problems fit one of four categories: classification, regression, clustering, or rule extraction.
- Recognizing the category helps you decide what data you need and which algorithms to try.
Why start with example problems?
Machine learning is defined by what it does, so examples teach more than formal definitions. Understanding the problem also clarifies the data you need and the goal of the algorithm.
These problems are everywhere. They form core parts of the software people use on the web or desktop every day, such as the “people you may know” suggestions on social networks or the speech understanding in Apple’s Siri.
What are ten examples of machine learning problems?
| Problem | Task | What a model enables |
|---|---|---|
| Spam detection | Given the emails in an inbox, decide which are spam and which are not | Keep legitimate mail in the inbox and move spam to a spam folder |
| Credit card fraud detection | Given a customer’s transactions in a month, identify those the customer did and did not make | Flag fraudulent transactions so they can be refunded |
| Digit recognition | Given a handwritten zip code on an envelope, recognize each digit | Read the zip code and sort envelopes by geographic area |
| Speech understanding | Given a spoken request, identify what the user wants | Act on the request, as the iPhone with Siri does |
| Face detection | Given a catalog of digital photos, find those that contain a given person | Organize or sort photos by person, as many cameras and operating systems do |
| Product recommendation | Given a customer’s purchase history and a large catalog, find products they are likely to buy | Suggest products, as Amazon does |
| Medical diagnosis | Given a patient’s symptoms and a database of anonymized records, predict whether the patient has a disease | Give decision support to medical professionals |
| Stock trading | Given the recent and past price movements of a stock, decide whether to buy, hold, or sell | Give decision support to financial analysts |
| Customer segmentation | Given a user’s behavior during a trial and past users’ behavior, predict who will upgrade | Target interventions to encourage likely upgraders |
| Shape detection | Given a shape drawn on a touch screen and a database of known shapes, work out which one the user meant | Replace the rough drawing with a clean version of the shape |
Together, these examples give a practical picture of a machine learning problem. In each case there is a decision to make, and a company or domain benefits from having that decision modeled and automated.
Which of these problems are hardest?
Some are among the hardest AI problems, particularly natural language processing and machine vision, where the task is something humans do effortlessly. Others, such as credit card fraud detection and spam detection, are still difficult but are classic examples of machine learning.
What categories of machine learning problems exist?
Looking back over the examples, similarities appear. Being able to identify the essence of a problem helps you think clearly about the data you require and the type of algorithm to use. The four categories below cover most of the problems you will meet.
- Classification: Data is labeled with a class, such as fraud or not fraud, spam or not spam. The goal is to learn from labeled examples so that labels can be assigned to new, unlabeled data. It can be seen as a discrimination problem that models the differences or similarities between groups.
- Regression: Data is labeled with a real value rather than a class label, such as a floating-point number. A common example is time-series data like a stock’s price over time. The task is to predict the value for new data.
- Clustering: Data has no labels but can be divided into groups based on similarity and other natural structure in the data. Organizing photos by face without names is an example, where a person then assigns names to the groups, as in iPhoto on the Mac.
- Rule extraction: Data is used to extract if-then rules (antecedent and consequent). These rules do not necessarily predict anything. They describe statistically supported associations between attributes. A well-known data mining story is the link between diaper and beer purchases.
How do you frame a new problem?
When you recognize that you have a machine learning problem, meaning a decision problem built from data, work backward from the result your client or requirement needs. Decide which category the problem fits, then choose the data and algorithms accordingly.
Frequently asked questions
What is a machine learning problem?
It is a decision problem that can be solved by learning from data, such as deciding whether an email is spam or which product to recommend.
What is the difference between classification and regression?
Classification assigns a class label, such as spam or not spam. Regression predicts a real number, such as a future price.
What is the difference between classification and clustering?
Classification learns from labeled data. Clustering works on unlabeled data and groups items by similarity.
Does rule extraction predict outcomes?
Not necessarily. It finds associations in the data, such as which items are often bought together, without requiring a prediction.
Conclusion
Machine learning is easiest to understand through problems such as spam detection, fraud detection, and recommendations. Most real problems can be framed as classification, regression, clustering, or rule extraction.
Identifying the category early makes it easier to decide what data to collect and which algorithms to use.



