The six stages of a machine learning project, from framing the problem and preparing data to deployment and monitoring, with the mistakes to avoid.
In this article
A machine learning project moves through six broad stages: define the business problem, collect and prepare data, build a baseline, train and evaluate models, deploy, and then monitor and improve. The surprise for most first-time teams is that the model itself is a small part of it. Problem framing, data quality and operations usually decide whether the project delivers value.
Stage 1: Frame the problem before touching data
Begin with a business outcome, not an algorithm. "Reduce time spent triaging support tickets" is a problem. "Use a neural network" is not. Then ask whether machine learning is the right tool at all. If a clear rule or a simple query solves it, use that: it is cheaper, easier to explain and easier to maintain.
Write down the following before any modelling starts:
- The decision or action the prediction will drive, and who takes it.
- The success measure in business terms, such as time saved or errors avoided, as well as a technical metric.
- The cost of mistakes. A false alarm and a missed case rarely cost the same.
- The constraints: latency, explainability, privacy, and how often predictions are needed.
The cost of mistakes determines which metric to optimise. Accuracy alone can mislead badly when one outcome is rare, so consider precision, recall and the trade-off between them.
Stage 2: Data collection and preparation
This stage typically takes the largest share of effort. Ask what data exists, whether you are permitted to use it for this purpose, how far back it goes, and whether it will look the same in production as it does in your history. Labels are often the hardest part: someone may need to define and record the outcome you want to predict.
Watch for these data problems early:
- Leakage. A feature that contains information only available after the outcome, such as a "resolved" flag used to predict resolution. Models look brilliant in testing and fail in reality.
- Bias in the sample. If past decisions were skewed, a model trained on them will learn the skew.
- Missing and inconsistent values. Decide deliberately how to handle them, and document it.
- Time. Split training and test data by time where predictions are about the future. Random splits can overstate performance.
Reliable, repeatable pipelines matter here. If data preparation is a one-off notebook, you cannot retrain safely later. The approach in idempotent data pipelines and backfills applies equally to feature pipelines.
Personal data deserves particular care. GDPR principles such as purpose limitation and data minimisation apply to training data. Check the Data Protection Commission (DPC) guidance and involve whoever handles data protection early. This is not legal advice.
Stage 3: Build a baseline first
Before any sophisticated model, build the simplest sensible baseline: a rule, an average, or a basic logistic regression. The baseline answers a vital question: how much better does the complicated approach need to be to justify its cost? Many projects find the baseline gets most of the way there. Others find that even a good model barely beats it, which is valuable knowledge that saves months of work.
Stage 4: Train, evaluate and iterate
Now experiment. Keep a clean separation between training, validation and test data, and do not tune against the test set repeatedly. Track every experiment: data version, code version, parameters and results. Without that, you will not be able to reproduce your best model.
| Question | What to check |
|---|---|
| Does it beat the baseline? | Compare on the same held-out data and the same metric. |
| Is it overfitting? | Large gaps between training and validation performance. |
| Where does it fail? | Break results down by segment, region, time period and rare cases. |
| Can people understand it? | Feature importance or example-level explanations suited to the audience. |
| Is it fair enough? | Compare error rates across relevant groups where this is appropriate. |
Offline metrics are a proxy. Where possible, validate with a limited trial: run the model silently alongside the current process, or show predictions to a small group, and compare against real outcomes.
Stage 5: Deployment
A model that lives in a notebook delivers nothing. Decide how predictions will reach the people or systems that use them: a batch job that writes scores to a table, a real-time API, or an embedded feature in an application. Each has different needs for latency, scaling and failure handling.
Treat the model as a software artefact. Version it, package it with its dependencies, test it, and deploy through the same disciplined pipeline you would use for any service. The practices in our guide to the GitHub Actions CI/CD pipeline carry over well, and so does the thinking on blue-green and canary deployments, since a canary rollout is a safe way to introduce a new model. Plan a rollback path and a sensible fallback behaviour for when the model is unavailable or uncertain.
Stage 6: Monitor and improve
Models degrade because the world changes. Customer behaviour shifts, upstream systems change their data, and the original relationship fades. Monitor input data quality, prediction distributions, and, once outcomes are known, real performance. We cover this in depth in model drift and MLOps monitoring. Decide in advance who owns the model, how often it is reviewed, and what triggers retraining or retirement.
Common mistakes to avoid
- Starting with the algorithm. Choose the problem and the metric first.
- Skipping the baseline. You cannot judge improvement without it.
- Underestimating data work. Plan for it explicitly.
- Treating deployment as an afterthought. Agree how predictions are consumed from the start.
- No ownership after launch. Someone must watch it and act on alerts.
- Overpromising. Be honest that results depend on data quality and may not reach hoped-for levels.
Roles and team shape
Successful projects rarely depend on one person. You need someone from the business who owns the problem and the decision, someone who understands the data and where it comes from, someone who can build and evaluate models, and someone who can deploy and run software. In a small company these may be two or three people wearing several hats, and that is fine, as long as each responsibility has a name against it. The business owner matters most: they decide whether a prediction is useful, whether the error trade-off is acceptable, and whether the process around the model will actually change.
Budgeting time and expectations
Machine learning work is uncertain in a way ordinary software is not, because you do not know whether the data contains enough signal until you try. Plan in short, time-boxed phases with explicit decision points: after framing, after the data check, after the baseline, and after the pilot. At each point it is legitimate to stop, change direction or proceed. Be wary of anyone who promises a specific accuracy before seeing your data. A good plan states what you will learn at each phase, what it will cost in effort, and what you will do if the answer is disappointing. Stopping early with a clear explanation is a good outcome compared with a half-working system nobody trusts.
It also helps to keep stakeholders informed with plain language updates: what was tried, what the numbers mean for the business, and what happens next. Our guide to how to plan a web app MVP describes the same minimum-viable mindset, and it transfers neatly to machine learning pilots where the smallest useful version is the one to build first.
What to do next
- Write the problem, the decision it supports and the cost of errors on one page.
- Check that data, labels and permission to use them exist.
- Agree a baseline and a success threshold before modelling.
- Plan how predictions will be delivered and who owns the model.
- Run a small, time-boxed pilot before committing to a larger build.
If you would like help with this, the CloudWiss team in Dublin can talk it through, from scoping to deployment, on our AI and data science page.
Share this article
General educational information, not legal or professional advice for your specific situation.
