What is Machine Learning?
Learning From Examples Instead of Rules
In traditional programming, you write the rules:
def is_fraud(txn):
if txn["amount"] > 2_000_000 and txn["country"] != "NG":
return True
return False
This works until fraudsters change their behaviour, and then someone has to write new rules by hand. Machine learning (ML) flips the approach. You give the computer thousands of examples of past transactions labelled "fraud" or "not fraud", and an algorithm learns the rules itself by finding patterns that separate the two groups.
Traditional programming: data + rules → answers Machine learning: data + answers → rules (a model)
That learned model can then make predictions on new data it has never seen.
Where You Already Meet ML
| Company | ML application |
|---|---|
| Access Bank, GTBank, Zenith | Card fraud detection, credit scoring |
| MTN, Airtel | Predicting which subscribers will churn; personalised data bundle offers |
| Carbon, FairMoney, Branch | Instant loan decisions from phone and transaction data |
| Jumia, Amazon | "Customers also bought" recommendations |
| Netflix, Spotify, YouTube | Recommending what to watch or listen to next |
| Google Maps, Uber, Bolt | Estimating arrival times and surge pricing |
| Gmail | Spam filtering |
Key Vocabulary
- Features (X): the input variables the model learns from, such as amount, time of day, merchant type and customer tenure
- Target / label (y): what you want to predict, such as fraud (yes or no) or house price
- Training: the process of the algorithm learning patterns from examples
- Model: the learned result, a function that maps features to predictions
- Prediction / inference: using the trained model on new data
The Three Types of Machine Learning
1. Supervised Learning
You have labelled examples: for every row, you know the right answer. The model learns to map features to that answer. This covers most business ML.
Supervised learning splits into two problem types, based on what kind of target you predict:
Classification: the target is a category.
- Will this customer churn? (Yes / No)
- Is this transaction fraudulent? (Fraud / Legit)
- Which of five loan risk grades should this applicant get? (A to E)
Regression: the target is a number.
- What will this apartment in Lekki rent for? (N per year)
- How many rides will Bolt need in Abuja at 6pm on Friday?
- What will a customer spend next month?
A quick test: if you can average the target, it is regression. If you would count it, it is classification.
2. Unsupervised Learning
You have no labels. The algorithm finds structure on its own.
- Clustering: group customers into segments with similar behaviour, for example "weekend big spenders" and "daily small transactors". A marketing team at MTN can then design a different offer for each segment.
- Anomaly detection: flag transactions that look unlike anything seen before.
- Dimensionality reduction: compress hundreds of features into a few (for example, with PCA) for visualisation or speed.
3. Reinforcement Learning
An agent learns by trial and error, receiving rewards or penalties. It powers game-playing AI (AlphaGo), robotics, and some recommendation and pricing systems. It is less common in everyday business data science, so this track focuses on supervised and unsupervised learning.
What About Large Language Models?
ChatGPT, Claude and Gemini are deep learning models: very large neural networks trained on huge amounts of text, first to predict the next word (self-supervised learning) and then refined with human feedback. They build on the same core ideas you are learning here: features, targets, training, evaluation and overfitting. A solid foundation in classical ML makes modern AI much easier to understand.
When NOT to Use Machine Learning
ML is powerful, but it is not always the answer:
- A simple rule works well enough. "Flag every transfer over N5 million for review" may be all you need
- You do not have enough labelled data. A few hundred examples rarely support a reliable model
- Decisions must be fully explainable and a black-box model would not be accepted by regulators
- The cost of mistakes is extreme and there is no human in the loop
Good data scientists try a simple baseline first, and only reach for ML when it clearly beats that baseline.
The ML Workflow in One Line
Define the problem → prepare features (X) and target (y) → split into train and test sets → train → evaluate → deploy → monitor.
In the next lesson you will run this whole loop in code and train your first model.
Try it yourself
Key Takeaways
- Machine learning learns rules from labelled examples instead of a programmer writing them by hand.
- Features (X) are the inputs and the target (y) is what you predict; training produces a model that makes predictions on new data.
- Supervised learning splits into classification (predict a category) and regression (predict a number).
- Unsupervised learning finds structure without labels, through clustering, anomaly detection and dimensionality reduction.
- Always compare ML against a simple baseline; if a rule works or data is scarce, ML may not be worth it.
Quick Quiz
1.A digital lender wants to predict the exact amount (in naira) a customer will borrow next month. What type of problem is this?
2.What is the key difference between supervised and unsupervised learning?
3.When is machine learning probably NOT the right tool?
Ready to go further?
CareerEx gives you structured 12-week training, live classes every Saturday and Sunday, real tutor feedback, and a certificate. Join the next cohort.
Join CareerEx