Search Knowledge

© 2026 LIBREUNI PROJECT

Machine Learning / Machine Learning Workflows

Machine Learning Workflows

Machine Learning Workflows

Machine learning development is an iterative lifecycle accommodating data variability.

Lifecycle Architecture

The development lifecycle consists of sequential phases and feedback loops:

Code
skinparam backgroundColor transparent
start
:Data Collection;
repeat
:Exploratory Data Analysis (EDA);
:Data Preprocessing & Cleaning;
:Model Training & Selection;
backward:Refine Features or Architecture;
repeat while (Meets Performance Goal?) is (no) not (yes)
:Final Validation;
:Model Deployment;
stop
Data CollectionExploratory Data Analysis (EDA)Data Preprocessing & CleaningModel Training & SelectionyesMeets Performance Goal?noRefine Features or ArchitectureFinal ValidationModel Deployment

Three Core Workflows

Developing machine learning systems involves three distinct architectural flows depending on the operational stage:

1. The Experimental Flow (Exploration & Prototyping)

Focused on data discovery. Data scientists work in interactive environments (e.g., notebooks) to query raw sources, perform Exploratory Data Analysis (EDA) to locate distributions and outliers, engineer prototype features, and evaluate baseline hypotheses.

2. The Production Pipeline (Continuous Training)

Focused on automation and scalability. Notebook experiments are codified into structured, reproducible pipelines:

  1. Validation: load and validate incoming data schemas.
  2. Preprocessing: fit and execute transformations.
  3. Training: automate hyperparameter search.
  4. Registry: evaluate targets and register valid binaries.

3. The Inference Flow (Batch vs. Real-time)

Deployment layouts depend on latency and throughput constraints:

  • Batch: offline, scheduled predictions on large datasets, maximizing throughput.
  • Real-time: on-demand predictions (e.g., via APIs) with minimal latency (under 100ms).

Example: Chaining Workflows via Pipelines

Scikit-learn Pipeline objects bundle preprocessing steps and estimators, preventing data leakage during validation:

python

Interactive Lab

Chain imputation, standard scaling, and logistic regression into a single pipeline.

Step 1
Inspect the idea
Step 2
Edit the program
Step 3
Run and compare

Exercise

Test your understanding of ML pipeline architectures:

Why must preprocessing parameters (like scaling means) fit only on the training dataset?

References & Further Reading

Previous Module Feature Engineering