Skip to content

Classification Models: Predict Yes or No from Data

Irish tax guides · AI and technology · 24 November 2026 · 5 min read

A classification model predicts a category, most often yes or no: will this client file late, will this customer default, is this payment a duplicate. It learns from past examples and outputs a probability for each new case. To judge it, you do not look at accuracy alone but at a small table called the confusion matrix, and at two measures called precision and recall.

What is a classification model?

A classification model sorts cases into groups. The simplest version has two groups: late or on time, fraud or genuine, will repay or will not. The model looks at the facts you give it about each case (the features) and compares them with past cases whose outcome is known. For a new case it returns a score between 0 and 1, and you choose a cut-off, for example 0.5, above which the answer is "yes".

Common types you will meet are logistic regression, decision trees and random forests. Logistic regression is the easiest to explain: it adds up weighted facts and turns the total into a probability. A decision tree asks a series of questions (is the invoice over €5,000? is the customer new?) and ends in a yes or no. For the wider picture of what a model is, see machine learning explained.

How do you judge whether a model is any good?

Hold back some cases the model has never seen, ask it to predict them, and put the results into four boxes:

  • True positives: the model said yes and it was yes.
  • False positives: the model said yes but it was no (a false alarm).
  • False negatives: the model said no but it was yes (a miss).
  • True negatives: the model said no and it was no.

From these four numbers you get the main measures. Accuracy is the share of all cases called correctly. Precision is the share of "yes" calls that were right: true positives divided by all yes calls. Recall is the share of real yes cases that were found: true positives divided by all real yes cases.

Worked example: a Dublin accountancy practice

Fionnuala's Dublin practice wants to predict which of its 200 clients will send records late at year end, so that staff can call them early. She trains a model on earlier years and tests it on 200 clients. The results:

  • Model said late and the client was late: 30.
  • Model said late but the client was on time: 20.
  • Model said on time but the client was late: 10.
  • Model said on time and the client was on time: 140.

The four boxes add up to 200 (30 + 20 + 10 + 140). Now the measures:

  • Accuracy = (30 + 140) / 200 = 170 / 200 = 85%.
  • Precision = 30 / (30 + 20) = 30 / 50 = 60%.
  • Recall = 30 / (30 + 10) = 30 / 40 = 75%.

In total 40 clients were really late (30 + 10), so a lazy rule that says "nobody will be late" is right on 160 of 200, or 80%. The model's 85% looks only a little better. But the model found three quarters of the late clients and 60% of its warnings were correct, which is far more useful for the person making phone calls.

Which matters more: precision or recall?

It depends on what a mistake costs. If a false alarm costs a five-minute phone call, you want high recall: catch as many late clients as you can. If a false alarm freezes a customer's account or declines a loan, precision matters more, because wrongly punishing honest people is expensive and unfair. You can move the balance by changing the cut-off. A lower cut-off finds more real cases but raises more false alarms. A higher cut-off does the opposite.

When the thing you predict is rare, such as fraud in a few payments in a thousand, accuracy becomes almost useless: a model that says "no fraud" every time is 99.9% accurate and catches nothing. Always ask for the confusion matrix.

What should you watch out for?

  • Imbalanced data. Rare events need precision, recall and often more data on the rare group.
  • Leakage. Features that contain the answer (such as a reminder sent after the due date) inflate your scores.
  • Bias. If past decisions were unfair, a model trained on them copies the unfairness. Review which groups are wrongly flagged.
  • Automated decisions about people. Under GDPR, people have rights when a decision is made only by automated means and has a significant effect on them. See using AI with personal data.
  • Drift. Customers and the economy change. Recheck the model on fresh data every few months.

To try it yourself on invoices or clients, follow the build steps in machine learning for finance with Python, and see what AI can and cannot do for accountants for the limits.

The Strategic Management programme helps you decide which questions are worth modelling and how to act on the answers, so that you stay in control of the analysis.

Key points

  • A classifier predicts a category and gives a probability for each case.
  • Judge it on hidden data using the confusion matrix.
  • Precision is how right the yes calls are; recall is how many real yes cases were found.
  • Compare with a lazy rule before you believe the accuracy figure.
  • Choose the cut-off by what a miss and a false alarm cost.

Questions people ask

What is the difference between precision and recall?
Precision is the share of the model's yes predictions that were correct. Recall is the share of all real yes cases that the model found. High precision means few false alarms, and high recall means few misses. You usually trade one for the other by moving the cut-off.
What is a confusion matrix in simple terms?
It is a table of four counts: true positives, false positives, false negatives and true negatives. It shows exactly where a model is right and where it goes wrong, which a single accuracy figure hides. Most other measures are calculated from these four numbers.
Why is accuracy misleading for rare events like fraud?
If only 1 payment in 1,000 is fraudulent, a model that always says no fraud is 99.9% accurate and finds nothing. For rare events you need precision and recall, which show how many real cases were caught and how many alerts were false alarms.
Which classification model should a beginner use?
Start with logistic regression or a small decision tree. Both are easy to explain to colleagues, lenders or regulators, and both often perform well on the tabular data in business finance. Move to more complex models only if the simple one clearly falls short.

Know someone this would help? Share it.