Artificial intelligence • Original RRTutors lesson
The Machine-Learning Workflow
Follow a reproducible path from problem framing and data preparation to deployment and monitoring.
Concept and explanation
An ML project includes data definition, collection, cleaning, feature preparation, splitting, training, validation, testing, release, and monitoring. Each step can introduce leakage or change the target being optimized. Versioning code, data definitions, model settings, and evaluation results makes decisions reproducible.
How to apply it
Create a pipeline with explicit training-only transforms, a validation strategy, a final test, and a deployment monitoring plan.
Worked example
A text classifier should fit its vocabulary only on training documents, not on the held-out test set.
Illustrative Python example
pipeline = [
"define target",
"validate and split data",
"fit preprocessing on training data",
"train and tune",
"evaluate once on held-out test data",
"monitor after release",
]
print(len(pipeline))
Expected result
The workflow separates model development from final evaluation and ongoing operation.
Limitations and cautions
A pipeline that is reproducible can still encode a poor objective or inappropriate data.
Practice exercise
Write a workflow checklist for a model that predicts late deliveries.
Key takeaway: Treat data processing and deployment as part of the model system.