Two questions
Which model do I need?
Two questions narrow it down: what does your data look like, and what do you want to do with it? Pick your data, then the goal that sounds most like yours.
- 8 kinds of data
- 10 kinds of model
- 21 guides with code
Rows in a spreadsheet or database
Customers, transactions, applications, products…
-
Sort each record (customer, transaction, application) into a category, like yes/no or high/low risk
That’s tabular classification, for questions like “Will this customer cancel next month?”
-
Predict a single number for each item, like a price, a cost or a duration
That’s number prediction (regression), for questions like “What will this house sell for?”
-
Spot rare events that look different from normal, like failing machines or suspicious activity
That’s anomaly detection, for questions like “Is this expense claim unusual?”
Numbers recorded over time
Daily sales, hourly sensor readings, website traffic…
-
Predict how a number will change over time, like sales next month or demand per day
That’s time-series forecasting, for questions like “How many loaves will we sell tomorrow?”
-
Spot rare events that look different from normal, like failing machines or suspicious activity
That’s anomaly detection, for questions like “Is this expense claim unusual?”
Text
Emails, reviews, tickets, social posts…
-
Sort pieces of text (emails, reviews, tickets, posts) into categories
That’s text classification, for questions like “Is this support ticket urgent?”
-
Answer questions or write text using your own documents, like a chatbot over your manuals
That’s LLM assistant (RAG chatbot), for questions like “What does our leave policy say?”
Documents to ask questions about
PDFs, manuals, policies, a wiki…
-
Answer questions or write text using your own documents, like a chatbot over your manuals
That’s LLM assistant (RAG chatbot), for questions like “What does our leave policy say?”
Images or photos
Product photos, scans, X-rays…
-
Give each whole image one label, like defect/OK, a species or a diagnosis
That’s image classification, for questions like “Does this photo show a defect?”
-
Find where things are in images or video, and count or track them
That’s object detection, for questions like “Where is each product on this shelf?”
Video or camera feeds
CCTV, drone footage, webcams…
-
Find where things are in images or video, and count or track them
That’s object detection, for questions like “Where is each product on this shelf?”
Audio or voice
Calls, meetings, voice commands, sounds…
-
Work with spoken audio or sounds: transcribe, caption or recognize them
That’s speech and audio, for questions like “What did the caller ask for?”
What people click, buy or watch
Purchase history, views, ratings…
-
Suggest the right items (products, content, jobs) to each person
That’s recommendation system, for questions like “Which products will this shopper like?”
Easily confused
- Classification or number prediction?
- If the answer is a category (will this customer leave: yes or no), it’s classification. If it’s an amount (how much will they spend next year), it’s number prediction. See tabular classification and number prediction (regression).
- Number prediction or forecasting?
- Forecasting predicts the next values of one series over time, mostly from its own history: sales per day next month. Number prediction estimates a value for each item from its details: the price of a house from its size and location. If the order in time is the main clue, it’s forecasting. See number prediction (regression) and time-series forecasting.
- Image classification or object detection?
- Image classification gives the whole photo one label, such as defective or OK. Object detection draws a box around each thing it finds, so you can count them or see where they are. See image classification and object detection.
- Classification or anomaly detection?
- If you have plenty of labeled examples of the bad cases, classification usually works better. If bad cases are rare, varied or new, learn what normal looks like and flag what isn’t: that’s anomaly detection. See tabular classification and anomaly detection.
- A chatbot or text classification?
- If you want answers or written text, use an LLM assistant over your documents (RAG). If you want each text sorted into fixed categories, use text classification. A language model can also sort text with no training, which makes a quick first version. See LLM assistant (RAG chatbot) and text classification.