Biology · Genomics, Omics & Bioinformatics
Reproducible workflows, prediction, validation and machine-learning limits
Sixteen files represent two readings from each of eight imagined units. Splitting one file from every unit into training and the other into testing leaves every biological unit on both sides. A model tested this way has not yet faced new units, even though the file names are different.
Gene Expression: RNA & Proteins explains how sequence, RNA and protein are related. Phylogeny, Classification & the Tree of Life introduces ancestry and the interpretation of trees. Research Design, Data & Scientific Practice explains sampling, independent units and the limits of comparisons. Their English chapters are available in this working manuscript; publication remains pending. The examples here use letter strings, inclusive coordinates, averages, fractions and ordinary graph reading. Each convention is introduced before it is used.
Back to the Biology mapBy the end, you can
Distinguish a traceable computation from independent predictive evidence, and recognise leakage, target-population mismatch and mechanistic overinterpretation.
Define the claim before interpreting a prediction
A computational workflow applies stated transformations to defined inputs. Recomputing its output checks the computational account. Predictive validation instead asks whether a chosen rule works on evidence not used to choose that rule, for a specified target. Neither result automatically establishes the mechanism that generated the pattern.
A target might be a new reading from a previously observed unit, a new individual from the same population, or a new population under different conditions. These are different tasks. The original split model asks about new independent units. Sharing a unit between training and testing therefore does not supply the intended held-out evidence.
A reproducible workflow retains input identities, reference and annotation versions, transformations, settings and the chosen evaluation account. That record helps others identify what was done. It cannot by itself repair an inappropriate split, biased test population or a target that is only an imperfect proxy for the biological question.
Information used for choosing a rule belongs on the training side
Training uses data to choose a predictive rule. Validation can guide choices such as which candidate model to retain. A held-out test assesses the chosen procedure under its stated target. If test information influences feature selection or other learned transformations, the eventual test is no longer independent of those choices.
Leakage can be subtle. Separate files can contain the same or dependent biological material; a predictor can include information unavailable at the intended prediction time; or features can be selected using outcomes from the whole dataset before a split. Repeating a contaminated assessment faithfully does not make its performance estimate appropriate.
In the model's first split, one reading from each of eight units trains and the other tests. All eight unit identities are shared. In the second split, all readings from units one through four train and all readings from units five through eight test. It removes this particular unit-overlap problem under the stipulated independence, without guaranteeing that every other design issue is resolved.
Different files can share the same biological units
Read the diagram in words
The file-wise split puts reading one of every unit in training and reading two in testing: eight shared units. The unit-wise split keeps units 1–4 in training and 5–8 in testing: no shared units; each side still has eight records.
| Biological unit identity | Technical reading within the unit | Training records | Held-out records |
|---|---|---|---|
| 1 | 1 | ✓ | × |
| 1 | 2 | × | ✓ |
| 2 | 1 | ✓ | × |
| 2 | 2 | × | ✓ |
| 3 | 1 | ✓ | × |
| 3 | 2 | × | ✓ |
| 4 | 1 | ✓ | × |
| 4 | 2 | × | ✓ |
| 5 | 1 | ✓ | × |
| 5 | 2 | × | ✓ |
| 6 | 1 | ✓ | × |
| 6 | 2 | × | ✓ |
| 7 | 1 | ✓ | × |
| 7 | 2 | × | ✓ |
| 8 | 1 | ✓ | × |
| 8 | 2 | × | ✓ |
| Prediction for a new independent unit | Biological units present on both sides | Biological unit identity |
|---|---|---|
| One reading per unit on each side | 8 | 1; 2; 3; 4; 5; 6; 7; 8 |
| Biological unit identity | Technical reading within the unit | Training records | Held-out records |
|---|---|---|---|
| 1 | 1 | ✓ | × |
| 1 | 2 | ✓ | × |
| 2 | 1 | ✓ | × |
| 2 | 2 | ✓ | × |
| 3 | 1 | ✓ | × |
| 3 | 2 | ✓ | × |
| 4 | 1 | ✓ | × |
| 4 | 2 | ✓ | × |
| 5 | 1 | × | ✓ |
| 5 | 2 | × | ✓ |
| 6 | 1 | × | ✓ |
| 6 | 2 | × | ✓ |
| 7 | 1 | × | ✓ |
| 7 | 2 | × | ✓ |
| 8 | 1 | × | ✓ |
| 8 | 2 | × | ✓ |
| Prediction for a new independent unit | Biological units present on both sides | Biological unit identity |
|---|---|---|
| All readings of a unit remain together | 0 | — |
| Prediction for a new independent unit | Training records · Assigned reading record | Held-out records · Assigned reading record | Training records · Biological unit identity | Held-out records · Biological unit identity |
|---|---|---|---|---|
| One reading per unit on each side | 8 | 8 | 8 | 8 |
| All readings of a unit remain together | 8 | 8 | 4 | 4 |
Removing unit overlap does not settle every validation issue
Original eight independent-unit account with two technical readings each. Target is a new independent unit, not a new reading of an old unit. Splits demonstrate unit overlap only; no trained algorithm, population-representative recruitment, clinical claim or study-size recommendation.
A passing test has a population and a metric
A classification account compares supplied predictions with known categories. Accuracy divides correct predictions by all evaluated cases. Sensitivity divides correctly identified positives by all cases in the positive category; specificity divides correctly rejected negatives by all cases in the negative category. These denominators answer different questions. A single percentage can hide which cases were missed.
The separate eight-unit test has three correctly identified positives, one missed positive, three correctly identified negatives and one false positive. Accuracy is six/eight. A second supplied environment record has different prediction errors and accuracy four/eight. These are original assigned outcomes, not measured results of a trained algorithm or evidence that an environmental change caused the difference.
Independent testing in one population does not guarantee transport to another. Recruitment, measurement, conditions or category definitions may differ. Testing in the intended setting addresses this uncertainty, while preserving how that setting was selected. Successful prediction still leaves causal explanations open: a useful proxy can forecast an outcome without being its mechanism.
Performance belongs to a record and its target
Read the diagram in words
The primary record has 3 correct positives, 1 missed positive, 3 correct negatives and 1 false positive: 6/8 correct. The second has 1 correct positive, 3 missed positives, 3 correct negatives and 1 false positive: 4/8 correct.
| Independent unit in this separate toy ledger | Known assigned category | Supplied predicted category | Known assigned category = Supplied predicted category |
|---|---|---|---|
| 1 | 1 | 1 | ✓ |
| 2 | 1 | 1 | ✓ |
| 3 | 1 | 0 | × |
| 4 | 1 | 1 | ✓ |
| 5 | 0 | 0 | ✓ |
| 6 | 0 | 0 | ✓ |
| 7 | 0 | 1 | × |
| 8 | 0 | 0 | ✓ |
| Correctly identified positives | 3 |
|---|---|
| Missed positives | 1 |
| Correctly rejected negatives | 3 |
| False positives | 1 |
| All evaluated units | 8 |
| Correct predictions divided by all units | 6/8 = 0.75 |
|---|---|
| Correct positives divided by all positive units | 3/4 = 0.75 |
| Correct negatives divided by all negative units | 3/4 = 0.75 |
| Independent unit in this separate toy ledger | Known assigned category | Supplied predicted category | Known assigned category = Supplied predicted category |
|---|---|---|---|
| 1 | 1 | 0 | × |
| 2 | 1 | 1 | ✓ |
| 3 | 1 | 0 | × |
| 4 | 1 | 0 | × |
| 5 | 0 | 1 | × |
| 6 | 0 | 0 | ✓ |
| 7 | 0 | 0 | ✓ |
| 8 | 0 | 0 | ✓ |
| Correctly identified positives | 1 |
|---|---|
| Missed positives | 3 |
| Correctly rejected negatives | 3 |
| False positives | 1 |
| All evaluated units | 8 |
| Correct predictions divided by all units | 4/8 = 0.5 |
|---|---|
| Correct positives divided by all positive units | 1/4 = 0.25 |
| Correct negatives divided by all negative units | 3/4 = 0.75 |
| Dimensionless fraction | 0 — 1 |
|---|
No measured algorithm performance or causal comparison
Original assigned predictions and true categories for two separate eight-unit evaluation records, independent of the split demonstration. No algorithm was trained or deployed, no empirical accuracy is reported, and no cause of the difference or future-population performance is supplied.
Worked example
Inspect the unit split and the outcome ledger
For the file-wise split, training contains the first reading from every unit and testing the second. Their sets of unit identities are identical, so the overlap is eight. Different record IDs conceal no independent new-unit assessment.
For the grouped split, eight training readings belong to units one through four and eight test readings to units five through eight. The unit overlap is zero. That split is appropriate for the toy new-unit target under its supplied independence assumption; it is not proof of population representativeness.
In the separate primary evaluation record, six of eight predictions are correct, giving accuracy three quarters. Three of four positives are identified and three of four negatives are correctly rejected. In the second environment, four of eight are correct, including only one of four positives. The comparison describes supplied records and cannot establish a causal explanation or real-world generalisation rate.
Check your understanding
Why is a file-wise split insufficient for the model's new-unit target?
Show reasoning
Both sides contain readings from all eight biological units. The test concerns another reading of already represented units, while the stated claim concerns new units. File-level separation does not remove the dependence.
Why must outcome-informed feature selection be included within the training part of validation?
Show reasoning
Selecting features using test outcomes gives the chosen rule information from its eventual assessment. Holding out the final fitting step alone does not undo that earlier use of test information.
Does accuracy three quarters on the primary toy test establish the same accuracy in another population or a causal mechanism?
Show reasoning
No. Performance belongs to the stated records, metric and population. The second supplied record illustrates a different result; neither record supplies a generalisation guarantee, intervention or mechanistic proof.
What to carry forward
A reproducible computation and a valid prediction claim require different checks; define the units, split, metric and population before generalising.
References
Resources supporting this lesson’s explanations and examples.
- Selection bias in gene extraction on the basis of microarray gene-expression data (PNAS 99(10):6562–6566 (2002). DOI: 10.1073/pnas.102102699)Christophe Ambroise and Geoffrey J. McLachlanOriginal research paper · PDF
- Leakage and the Reproducibility Crisis in ML-based Science (arXiv:2207.07048v1, 14 July 2022. DOI: 10.48550/arXiv.2207.07048)Sayash Kapoor and Arvind NarayananResearch preprint
- Number of replicates · Functional genomics II (Original training page inspected 13 October 2026)EMBL-EBI TrainingOriginal institutional tutorial