A first machine learning project in an organisation usually starts from a spreadsheet and an ambition. The spreadsheet holds a few years of orders, tickets, inspections or readings. The ambition is that it ought to be possible to predict something from it.
Often it is. What follows is the order of work that gives such a project the best chance. Very little of it concerns the choice of model, because that is rarely where first projects go wrong.
1. Name the decision
Write one sentence of this form: when X happens, we will do Y instead of Z, depending on the prediction.
"Predict which machines will fail" is not such a sentence. "Each Monday, send the technician to the ten machines most likely to fail in the next fortnight, in place of the fixed rota" is.
The sentence determines everything that follows: what is predicted, how far ahead, how often, and what it is worth. If nobody can write it, stop. A prediction that changes no decision has no value, however accurate.
2. Price the errors
Every prediction is wrong in two ways. A machine is flagged and would have been fine: a wasted visit. A machine is not flagged and fails: a breakdown.
Put rough costs on both. They need not be precise, and they are seldom equal. If a breakdown costs twenty times a visit, the right system flags generously and is "wrong" most of the time. Without these two numbers, there is no way to say what a good model would be.
3. Write down the baseline
What would a sensible person do with no model? Visit the oldest machines first. Assume next week's demand equals the same week last year. Flag any customer whose orders have halved.
Measure how well that rule would have done on past data. This is the baseline, and it serves two purposes. It is the figure the model has to beat, and it is very often good enough to put into use next week while the rest of the project proceeds.
A surprising number of projects end here, successfully.
4. Build the table
Machine learning of the ordinary kind needs a table: one row per case, columns describing what was known, and one column holding what happened.
For the maintenance example: one row per machine per week. Columns for age, hours run, days since the last service, faults in the previous three months. A final column: did it fail within the following fortnight?
Assembling this is most of the work. Expect it to take longer than everything else combined, and expect it to reveal how the data was really recorded: units that changed, gaps where a system was replaced, codes that mean different things at different sites.
5. Guard against the future
The most damaging mistake in the field is letting information into a row that would not have been available at the moment of prediction.
A column "service priority" that is filled in after a fault is reported. A customer status set to "closed" once they have left. An average calculated over the whole period, including the weeks being predicted.
Such leaks produce models that look brilliant in testing and are worthless in use. For every column, ask: on the Monday in question, would we have had this value, as it appears here? Be suspicious of any result that seems too good.
6. Split by time
To test a model, some data is held back. The usual instruction is to hold back a random portion. For anything that unfolds over time, that is wrong, because the model then learns from weeks on both sides of the ones it is tested on.
Train on the earlier years. Test on the most recent period. That is the situation the model will face in use: predicting a future it has not seen.
7. Start with a simple model
Begin with a method whose behaviour can be inspected: a linear or logistic regression, or a small decision tree. Compare it with the baseline from step three, using the costs from step two.
Then, if the data is tabular, try gradient-boosted trees, which are a dependable general-purpose choice. If the complex model beats the simple one by a wide margin, find out why before rejoicing; revisit step five. If it wins by a little, consider whether the gain justifies a system that is harder to explain and maintain.
Deep neural networks are the right tool for images, sound and text. For a few thousand rows in a spreadsheet they are seldom the best choice.
8. Look at what it gets wrong
Take fifty cases where the model was confidently mistaken and read them with someone who knows the operation. This is the most productive hour in the project.
The errors usually fall into groups. Some are bad data. Some reveal a factor nobody recorded, such as the fact that one site runs its machines outdoors. Some show that the outcome was mislabelled. Each group suggests a specific improvement, and each is something no summary statistic would have shown.
Check, too, whether the errors fall unevenly: on one site, one product line, one group of customers. An average can conceal a model that works well for most cases and badly for a few.
9. Run it in the shadows, then keep watching
Before the model drives any decision, let it run alongside the existing process for some weeks. It makes its predictions; people carry on as before; the two are compared afterwards. This shows how it behaves on live data, with all the delays and gaps that test data lacked.
After the switch, the work continues. The world moves: new machines, new customers, a change in how a field is filled in. Performance decays quietly. Decide in advance which figure will be checked each month, who checks it, and at what level the model is retrained or retired.
Agree, as well, what the people using it should do when they think it is wrong. If their judgement cannot override the system, they will stop trusting it. If their overrides are recorded, the system has a source of improvement.
What this leaves out
It leaves out the algorithms, deliberately. Good free software implements them, and the choice among them matters far less than the nine steps.
It also leaves out large language models, which are a different kind of tool: suited to reading, summarising and drafting text, and bought as a service more often than built. Steps one, two, three, eight and nine apply to them unchanged.
Notice that the first three steps need no data scientist. They need someone who understands the operation and can say what would be done differently. An organisation that has done those three well has a specification that any competent practitioner can work from. If it has not, the project is likely to fail whoever is hired.



