Skip to content

Reproducible Machine Learning Experiments

For people

Seeds, versioned data, tracked parameters and saved environments: how to make results you can trust and repeat.

Editorial team 2 min read

If you can't reproduce a result, you can't trust it, debug it or build on it. Reproducibility is a habit, not an afterthought.

Control Randomness

Set random seeds for data splits, model initialisation and sampling (random_state in scikit-learn; seeds in NumPy and PyTorch). Some GPU operations remain non-deterministic, so report averages over several runs when differences are small.

Version Your Data

Record exactly which data a model was trained on: a file hash, a snapshot date, or a dataset version. Keep the train, validation and test splits fixed and saved.

Track Every Run

For each experiment, log:

  • code version (a git commit);
  • data version;
  • hyperparameters;
  • metrics on validation and test sets;
  • the environment (library versions).

Tools such as MLflow or Weights & Biases automate this, but even a spreadsheet beats nothing.

Pin the Environment

Save dependencies with exact versions (requirements.txt with pinned versions, a lock file, or a container image). Models saved with pickle may not load in other library versions.

Automate the Pipeline

Put data preparation, training and evaluation in scripts rather than manual notebook steps, so the full process can be rerun from scratch.

Document Decisions

Note why choices were made — features dropped, thresholds chosen — so the next person understands the model, not just the code.

More in Machine learning

All Machine learning guides →
Machine learning Guide · 2 min

Linear Regression Explained

The simplest predictive model: how linear regression fits a line through data, how to read its coefficients, and when it breaks down.

Machine learning 2 min read 18 Sep 2026 For people

Machine learning Guide · 2 min

Logistic Regression for Classification

Despite its name, logistic regression is a classification method. How it produces probabilities and why it remains a strong baseline.

Machine learning 2 min read 17 Sep 2026 For people

Machine learning Guide · 2 min

Decision Trees

How decision trees split data with simple questions, why they are easy to explain, and why single trees overfit.

Machine learning 2 min read 16 Sep 2026 For people

Machine learning Guide · 2 min

Random Forests

Why averaging many randomised decision trees produces a robust, accurate model with little tuning.

Machine learning 2 min read 15 Sep 2026 For people

Share X LinkedIn Reddit Bluesky Email

Discussion 0

Use @handle to bring somebody in, and #tag to file it.

Nothing here yet. Ask a question, or say how you used it.

Sign in to join the discussion. Sign in