← BIT 402 Artificial Intelligence in Business
Machine Learning Fundamentals
Notes
Learning from business data
Machine learning uses statistical algorithms to learn patterns from examples rather than requiring explicit rules for every decision. Supervised learning uses labelled examples, such as transactions marked fraudulent or legitimate. Classification predicts a category, whereas regression predicts a numerical value such as weekly demand. Unsupervised learning finds structure without labelled outcomes, for example grouping customers by purchasing behaviour. Features are measurable inputs used by a model. Useful features should be available when a decision is made, relevant to the business problem and collected through lawful, documented processes.
Evaluating generalisation
Separate training, validation and test datasets so that performance reflects unfamiliar cases. Training fits model parameters, validation supports model selection, and a held-out test set estimates final performance. Data leakage occurs when information unavailable at prediction time enters training or evaluation. Overfitting means learning accidental patterns that do not generalise. Accuracy measures the proportion of correct predictions, but can mislead when classes are imbalanced. Precision measures how many flagged cases are truly positive, while recall measures how many actual positive cases are detected. Metric selection should reflect the costs of different errors.
Practical example
A Nairobi mobile money agent tests a fraud screening model on 1,000 transactions, including 40 confirmed fraudulent transactions. The model flags 50 transactions, of which 30 are actually fraudulent. Precision is 30 ÷ 50 = 60%, while recall is 30 ÷ 40 = 75%. There are 20 false alarms and ten missed frauds. A model that labels everything legitimate would achieve 960 ÷ 1,000 = 96% accuracy but detect no fraud. The agent therefore compares fraud losses and review costs instead of selecting a model solely from its headline accuracy.
Quiz
1. Predicting next week revenue as a number is which task?
2. What is the fraud model recall?
3. Why is the all-legitimate model unsuitable in the example?
Sign in to submit and securely grade your quiz.