LearnFoundationsWhat Is Machine Learning in Simple Terms?
Foundations

What Is Machine Learning in Simple Terms?

Machine learning is a way of teaching software to make predictions by showing it examples rather than writing explicit rules. Instead of a programmer coding "if X then Y" for every situation, the system studies patterns in data and figures out the rules on its own.

Bonaventure Ogeto July 30, 2026 6 min read

Machine learning is a way of teaching software to make predictions by showing it examples rather than writing explicit rules. Instead of a programmer coding "if X then Y" for every situation, the system studies patterns in data and figures out the rules on its own.

One example we will follow from start to finish

To make this concrete, we will trace a single scenario through the entire piece: a Kenyan mobile lender deciding whether to approve a loan application.

Traditional software would use hand-written rules. A programmer might code: "If the applicant has been on M-Pesa for more than two years and has a monthly transaction volume above KES 20,000, approve the loan." That works for obvious cases, but it misses patterns a human programmer cannot anticipate, like how repayment behavior correlates with the time of day someone typically sends money or the consistency of their transaction amounts over six months.

Machine learning takes a different approach. Instead of writing rules, you feed the system thousands of past loan applications along with their outcomes: approved and repaid, approved and defaulted, rejected. The system finds patterns in that data and builds its own rules.

Step one: collecting the data

Our mobile lender gathers historical records. Each record includes data points about the applicant (account age, average transaction size, frequency of transactions, number of unique contacts, geographic consistency) and the outcome (repaid on time, repaid late, defaulted).

This collection step matters more than most people realize. If the data only includes applicants from Nairobi, the system will learn patterns specific to Nairobi. If the data is missing key fields, the system cannot use those fields to make predictions. The quality of the data sets the ceiling for how well the model can perform.

In Kenya's lending market, this data step is where many models succeed or fail. Lenders with broader, cleaner transaction data build better models. Those working with thin data end up with models that approve too many bad loans or reject too many good ones.

Step two: training the model

Training is where the "learning" happens. The system processes each historical application and compares its prediction against the actual outcome. Did this person repay or default? When the prediction is wrong, the system adjusts its internal calculations. When the prediction is right, it reinforces those calculations.

Think of it like a student doing thousands of practice exams where the answers are provided after each attempt. After enough practice, the student starts recognizing which question patterns lead to which answers, even on questions they have not seen before.

For our lender, the model might discover that applicants who receive consistent monthly deposits from three or more sources and whose transaction frequency has been stable over six months have a default rate below a small fraction. No programmer wrote that rule. The model found it in the data.

Step three: making predictions

Once trained, the model is deployed. A new applicant submits a loan request. The model receives their data (transaction history, account age, patterns), runs it through the calculations it developed during training, and outputs a prediction: likely to repay or likely to default, along with a confidence score.

The lender sets a threshold. If the model predicts repayment with most or higher confidence, approve automatically. Below that, flag for human review. The model handles the routine decisions. Humans handle the edge cases.

This is where machine learning differs from traditional programming. The programmer never specified what patterns to look for. The model discovered them. If lending patterns shift (say, a new mobile money service changes how people transact), the model can be retrained on fresh data to adapt.

What machine learning is not

Machine learning is not thinking. The loan model has no understanding of what money is, what debt means, or why someone might default. It found statistical correlations in numbers.

It is not magic. A model trained on bad data produces bad predictions. A model trained on biased data produces biased predictions. If historical lending data reflects discriminatory practices, the model will replicate those patterns unless steps are taken to correct for bias.

It is also not one single technique. Machine learning includes many methods: decision trees, neural networks, support vector machines, and others. The specifics matter to engineers, but for beginners, the core principle is the same across all of them. Show the system examples, let it find patterns, use those patterns to predict new cases.

Where we encounter machine learning in Kenya

The loan-scoring example is just one application. Machine learning powers the M-Pesa fraud detection that quietly monitors every transaction. It runs behind the recommendation systems on streaming platforms suggesting your next show. It drives the spam filter on your email, the predictive text on your phone keyboard, and the route suggestions on Google Maps during Nairobi rush hour.

Kenyan agriculture is seeing growing adoption, too. Models trained on satellite imagery and weather data help predict crop yields and advise on planting windows. The Kenya Agricultural and Livestock Research Organisation has explored such tools to support farmers in regions where extension officers cannot visit frequently.

How this connects to AI

Artificial intelligence is the broad goal of building systems that make decisions from data. Machine learning is the primary technique for achieving that goal. Almost every AI product you interact with today, from chatbots to image recognition, uses machine learning under the hood.

Understanding machine learning gives you a practical foundation for understanding automation as well. Simple automation follows fixed rules. When the task requires predictions or pattern recognition, machine learning is what makes it possible. Knowing where that boundary falls helps you choose the right tool for each problem.

For a hands-on introduction to these concepts, the free welcome module of our AI and Automation course walks through the fundamentals in a structured, practical way.

FAQ

Do I need to know math to understand machine learning?

Not to use machine learning tools. Products like ChatGPT, Google Translate, and M-Pesa's fraud system all use machine learning, and you interact with them without touching any mathematics. If you want to build or customize models, some statistics and linear algebra knowledge helps. But for applying machine learning tools in your work, understanding the concept (data in, patterns found, predictions out) is enough.

How much data does machine learning need?

It depends on the complexity of the problem. Simple predictions might work with a few hundred examples. Complex tasks like image recognition or language understanding require millions of examples. For Kenyan businesses exploring machine learning, data availability is often the main bottleneck. Start by consistently collecting and organizing data from your operations, even before you plan to use machine learning. Clean, well-structured data is the foundation.

Can machine learning models be wrong?

Yes, regularly. No model achieves 100% accuracy. That is why responsible deployment always includes human oversight, especially for high-stakes decisions like lending, healthcare, or legal matters. Models also degrade over time as the real world changes. A model trained on pre-pandemic transaction data may not predict well in a post-pandemic economy. Regular retraining on fresh data keeps models relevant.

What is deep learning, and is it different from machine learning?

Deep learning is a subset of machine learning that uses layered structures called neural networks. It excels at tasks involving images, audio, and text. The chatbots, image generators, and voice assistants you see in headlines all use deep learning. Think of machine learning as the broad category and deep learning as one powerful method within it, particularly suited to complex, unstructured data.

Frequently Asked Questions

### Do I need to know math to understand machine learning?

Not to use machine learning tools. Products like ChatGPT, Google Translate, and M-Pesa's fraud system all use machine learning, and you interact with them without touching any mathematics. If you want to build or customi

Start the Free Preview

7-minute Welcome lesson, no purchase required

B

Bonaventure Ogeto

Founder, Mctaba Labs

Software engineer building products for the African market. Teaching 10,000+ students across multiple platforms. BSc Mathematics & Computer Science from JKUAT.