CertBrain
CoursesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

The AI and ML Pipeline

A machine learning (ML) pipeline is the series of stages that turns a business problem and raw data into a working model that keeps performing well. The exam expects you to name each stage, say what it produces, and recognise which stage a scenario is describing.

9 cards
Study this deck

The AI and ML Pipeline

A machine learning (ML) pipeline is the series of stages that turns a business problem and raw data into a working model that keeps performing well. The exam expects you to name each stage, say what it produces, and recognise which stage a scenario is describing.

From Business Goal to ML Problem

Every pipeline starts before any data is touched. First, the team agrees on the business goal: the problem to solve and how success will be measured, such as "cut late deliveries by 10%". Then comes problem framing: turning that goal into something a model can predict. For late deliveries, the model might predict "will this order arrive late: yes or no?" The thing being predicted is called the label or target. If the goal can't be measured, or the problem can't be framed as a prediction, ML may not be the right tool.

Data Collection and Exploration

Next, the team gathers data from wherever it lives: databases, logs, files, or third-party sources. Exploratory data analysis (EDA) comes next. It means looking at the data with charts and summary statistics to understand it before building anything. EDA reveals missing values, odd outliers, and whether the data actually contains signals related to the label. Skipping it often means discovering problems only after a model has been trained on bad data.

Pre-processing and Feature Engineering

Raw data is rarely ready for training. Pre-processing cleans it: filling or removing missing values, fixing formats, removing duplicates, and splitting the data into training, validation and test sets. Feature engineering creates the inputs the model learns from. A feature is one measurable input, such as "distance to customer" or "day of week". Engineering features might mean combining columns, converting dates into weekdays, or turning text categories into numbers. Good features often matter more than the choice of algorithm.

Training, Tuning and Evaluation

During training, an algorithm learns patterns from the training data and produces a model. Hyperparameter tuning adjusts the settings that control how training happens, such as how long it runs, to find the best-performing version. Evaluation then tests the model on data it hasn't seen, using metrics such as accuracy or recall, to decide whether it's good enough for the business goal.

Deployment and Monitoring

Deployment puts the model where applications can send it new data and get predictions back. That stage is called inference. Monitoring watches the deployed model over time. Real-world data drifts: customer behaviour changes, new products appear, and accuracy quietly drops. When monitoring spots a drop, the team goes back to earlier stages, often retraining with fresh data. That's why the pipeline is drawn as a loop, not a straight line.

On the Exam

StageWhat it produces
Data collectionRaw data gathered in one place
EDAUnderstanding of the data and its problems
Pre-processingClean data split into training, validation and test sets
Feature engineeringModel-ready input features
Training and tuningA trained model with chosen hyperparameters
EvaluationMetrics showing whether the model meets the goal
DeploymentAn endpoint or job that serves predictions
MonitoringAlerts about drift that trigger retraining

A common trap is mixing up pre-processing (cleaning what's there) with feature engineering (creating new inputs). Another is forgetting that monitoring feeds back into retraining.

Quiz me on this
A logistics company has collected two years of delivery records. Before building any model, a data scientist plots the data and computes summary statistics and finds that 15% of the "delivery time" values are missing. Which pipeline stage is the data scientist performing?
  1. Feature engineering
  2. ✓ Exploratory data analysis
  3. Model evaluation and validation
  4. Hyperparameter tuning
A retailer's model predicts weekly store sales. The team converts each transaction date into "day of week" and "is public holiday" columns, because sales depend on those patterns more than on the raw date. What is this work called?
  1. Data collection
  2. Production model monitoring
  3. Pre-processing
  4. ✓ Feature engineering
What is the correct order of these ML pipeline stages?
  1. ✓ Data collection, feature engineering, training, evaluation, deployment, monitoring
  2. Data collection, training, feature engineering, deployment, evaluation, monitoring
  3. Feature engineering, data collection, evaluation, training, monitoring, deployment
  4. Data collection, evaluation, feature engineering, training, monitoring, deployment
An insurer's claims model was accurate at launch, but six months later its predictions are noticeably worse because customer behaviour has changed. The model code has not changed. Which pipeline activity should catch this, and what does it usually lead to?
  1. Hyperparameter tuning, which leads to choosing a new algorithm from scratch
  2. Exploratory data analysis, which leads to deleting the deployed model
  3. ✓ Model monitoring, which leads to retraining with more recent data
  4. Feature engineering, which leads to freezing the model so it can't change
Exploratory data analysis (EDA)
Studying data with charts and summary statistics before modelling, to understand it and find problems such as missing values or outliers.
Pre-processing
Cleaning and preparing raw data (fixing formats, handling missing values, removing duplicates, splitting into train/validation/test sets).
Feature engineering
Creating, transforming or selecting the input variables (features) a model learns from, such as turning a date into a day of the week.
Hyperparameter tuning
Adjusting the settings that control how a model is trained, to find the version that performs best.
Why is the ML pipeline drawn as a loop?
Monitoring finds drift in production, which sends the team back to collect fresh data and retrain the model.