Introduction: What Is the Machine Learning Process?
What is machine learning? How is it implemented? Machine learning is a branch of artificial intelligence in which programs improve at a task automatically by learning patterns from data rather than being explicitly programmed. There are many concepts and steps to learn about machine learning; in this post, we focus on briefly describing the machine learning process.
There are dozens of definitions of machine learning floating around. The field sits within artificial intelligence and draws on statistics, probability, computer science, and even neurobiology — most obviously when we build artificial neural networks.
If you have not read it yet, I recommend Tom Mitchell’s Machine Learning (McGraw-Hill, 1997). It covers core algorithms such as decision trees (one of my favourites :), Bayesian learning, reinforcement learning, and k-nearest neighbours.
In his book, Machine Learning, Mitchell defines machine learning as:
The field of machine learning is concerned with the question of how to construct computer programs that automatically improve with experience.
To simplify: in machine learning, we write programs that take in data and produce the results we want. The rest of this post walks through the stages of that process.
The Machine Learning Process: Key Stages
Here is the process broken into its key stages, from defining the problem to deploying — and monitoring — the model.
One picture is worth a thousand words. Here is a simplified diagram of the process; in practice, it gets messier.

The Primary Objective of Supervised Learning
Every supervised machine learning algorithm is chasing the same thing: a mapping function that links your input data (X) to the output you care about (y). Think of it as a hidden pattern buried in the data — the algorithm’s whole job is to dig it out.
In practice, that means training the model on a labelled dataset (known input-output pairs) so it can predict y for new, unseen X accurately. The mapping function is not always obvious — it can take some fairly hairy mathematics to reveal — but once the algorithm finds it, the model can generalise from the training data to make predictions on data it has never seen.
With that mental model in place, let’s walk through the machine-learning steps that get you from raw data to a working model.
Problem Definition
As in any complex process, we start by defining the problem you want to solve or the question you want to answer using machine learning. This step includes identifying the objectives and goals, understanding the problem’s context, and determining the project’s scope.
Data Collection
The next step is gathering the data to train and test your machine learning models. Data can come from various sources — internal databases, APIs, sensor readings, or ready-made datasets such as those on the UCI Machine Learning Repository. Data quality and relevance are crucial at this stage: a model is only ever as good as what you feed it.
Data Preprocessing
Raw data is rarely ready for a model. You will need to clean it, transform it, and “preprocess” it before training — handling missing values, encoding categorical features, and scaling or normalising the numeric ones. Scikit-learn’s preprocessing module covers the standard techniques well.
Some algorithms are pickier than others. Regression tends to want numeric input, while decision trees can handle categorical values directly without much fuss.
On this blog, you can read more about data exploration and wrangling in the post Data Exploration and Analysis with Python Pandas.
Data Splitting
A model can rack up a suspiciously high accuracy on the data it was trained on and still fall apart on anything new — that is the whole reason we hold data back. Split your data into a training set (what the model learns from), a validation set (for tuning hyperparameters along the way), and a test set (kept untouched until the final evaluation). Google’s Machine Learning Crash Course explains why this three-way split matters for judging whether a model actually generalises.
Feature Engineering
Feature engineering means selecting, creating, or transforming input variables to make the model’s job easier — think normalising a skewed numeric column or binning ages into ranges. Google’s Machine Learning Crash Course has a good walkthrough of these techniques. Good feature engineering often moves the needle on model performance more than switching algorithms does.
Model Selection
We must choose the appropriate machine learning algorithm or model for the problem. Selection depends on factors like the nature of the problem (classification, regression, clustering), the dataset’s size, and the desired output.
With enough experience, and a few guidelines, you can usually narrow down which algorithms are worth trying for a given case. Some algorithms require human involvement for labelling data samples. For instance, we employ supervised machine learning when doing image classification: we provide a label for each image in the training dataset. In other algorithms, we do not give any labels. These are called “unsupervised learning” and work as a “magic box” without much human involvement.
You can read more about the machine-learning approaches, including supervised learning, unsupervised and reinforcement learning and algorithms at Machine learning.
Model Training
Next, we use the training dataset to train the selected model. The model learns from the data by adjusting its parameters to minimise prediction errors, typically using an optimisation technique like gradient descent or one of its variants, such as stochastic gradient descent or Adam.
Hyperparameter Tuning
Most algorithms come with a set of hyperparameters — settings you choose rather than ones the model learns — and getting them right matters. You fine-tune these using the validation dataset, typically with grid search or random search to hunt down the best combination.
Model Evaluation
Now assess the model’s performance using the test dataset. The metrics you reach for depend on the problem: accuracy, precision, recall, and F1 score for classification; mean squared error for regression.
In one of my previous posts Machine Learning Tests using the Titanic Dataset, we go through the whole machine learning experimentation process, starting from the data preprocessing, including feature engineering and selection, and finishing by comparing several supervised models.
Model Deployment
Once the model performs well enough, you deploy it to make predictions in the real world — wrapped behind a REST API, bundled into a mobile app, or wired into a larger system. Google’s MLOps guide is a solid reference for doing this properly: automating the training pipeline, testing the model like any other software artefact, and rolling out updates without breaking production.
Monitoring and Maintenance
Once deployed, keep monitoring the model — deployment is not the finish line. Over time, the real-world data drifts away from what the model was trained on, a phenomenon known as concept drift, and performance quietly degrades. Regular updates and maintenance keep it honest.
Documentation and Communication
Document the whole process — the problem statement, data sources, preprocessing steps, model architecture, and results — so someone else (including future you) can follow what happened and why. Explaining the results clearly to whoever asked for the model matters just as much as building it.
Reiteration and Improvement
As the diagram shows, deployment rarely means you are done. You might redefine the goals, collect fresh data, and rebuild the model after watching it run in the real world.
The machine learning process is often iterative. If the model’s performance is unsatisfactory, you may need to revisit previous steps, improve data quality, or experiment with different models.
Quick Checklist
Before you call a machine-learning project done, make sure you have:
- Defined the problem and what success looks like
- Collected data from reliable, relevant sources
- Cleaned, encoded, and scaled the data
- Split it into training, validation, and test sets
- Engineered features that actually help the model
- Selected an algorithm suited to the problem
- Trained the model and tuned its hyperparameters
- Evaluated it against the test set with the right metrics
- Deployed it, with monitoring in place for drift
- Documented the process for the next person (possibly you)
Conclusion: The Iterative Machine Learning Workflow
In short, machine learning is like teaching computers to learn from examples instead of programming them explicitly—the machine-learning process can vary in practice depending on the specific problem, data, and goals.
The following posts will focus on the essential concepts and techniques for building and evaluating models in machine-learning experiments. Come again soon!
Did you like this post? Please let me know if you have any comments or suggestions.
Posts about Machine Learning that might be interesting for youReferences
1. Mitchell, T. M. (1997). Machine Learning. McGraw-Hill
2. Supervised learning — scikit-learn documentation
3. Data Exploration and Analysis with Python Pandas
4. Preprocessing data — scikit-learn documentation
5. Dividing the original dataset — Google Machine Learning Crash Course
6. Working with numerical data — Google Machine Learning Crash Course
8. Linear regression: Gradient descent — Google Machine Learning Crash Course
9. Tuning the hyper-parameters of an estimator — scikit-learn documentation
10. Metrics and scoring: quantifying the quality of predictions — scikit-learn documentation
11. Machine Learning Tests using the Titanic Dataset
12. MLOps: Continuous delivery and automation pipelines in machine learning — Google Cloud
Enjoyed this? Get more like it.
Weekly notes on AI tools, Python, and what I'm actually building — plus two free gifts: the 15-page Fantastic AI: The 2026 Toolkit and a Git Commands & Contribution Workflow Cheatsheet.