Bacterial or viral?
Inspect a blood sample, calculate its model score, then reveal the recorded label.
The research data could not load
Keep index.html, styles.css, app.js and data.js in the same folder, then reload this page.
Choose a test sample
59 availableSample codes from the independent GSE42026 cohort.
- Expression platform
- Illumina HT-12 V3
- Model input
- 200 gene measurements
- Input check
- Checking measurements…
- Recorded label
- Hidden until revealed
The frozen model calculates locally in your browser.
Model prediction
Logistic regressionReady to explore
Calculate a prediction to see how this sample’s gene expression contributes to its classification.
Predicted infection class
Model scores describe this classifier’s output. They are not validated clinical probabilities.
Decision threshold 0.50
Changing the threshold demonstrates a trade-off. The study evaluated a fixed threshold of 0.50.
Gene measurements
Real expression values for the model’s 200 selected genes.
| Gene | Log2 expression | Cohort z-score | Model contribution |
|---|
A contribution is the gene’s z-score multiplied by its frozen model weight. Positive values favour bacterial; negative values favour viral. Contributions are predictive associations, not evidence of causation.
Cohort results
The frozen logistic regression model on 59 independent test samples.
18 bacterial and 41 viral cases, including H1N1 and RSV. Metrics below use the study’s threshold of 0.50.
Where the model gets it right
Rows show recorded infection. Columns show prediction.
| Recorded | Bacterial | Viral |
|---|---|---|
| Bacterial | True positives | False negatives |
| Viral | False positives | True negatives |
A missed bacterial case is a false negative. Select “Missed bacterial” in the explorer to inspect a real example.
Performance against the baseline
| Measure | Model | Always viral |
|---|
Balanced accuracy gives equal weight to bacterial sensitivity and viral specificity. An always-viral baseline misses all 18 bacterial cases.
Discrimination across thresholds
AUROC summarises how well scores separate the two classes. It does not mean that 90% of predictions are correct.
Methods & sources
What this demonstration computes, and what the research supports.
How the prediction works
- Read real measurements
The source is the public GSE42026 whole-blood expression dataset.
- Use comparable genes
The notebook matches probe IDs across Illumina V3 and V4 platforms. ANOVA F-score selection chooses 200 of 12,543 candidate genes.
- Apply the frozen model
The browser calculates the weighted sum of the cohort-standardised gene values plus the intercept, then applies the logistic function.
- Compare after prediction
The recorded label stays separate from the model inputs and is revealed only when requested.
Research boundaries
This is a demonstration using existing test samples, not a service for diagnosing new patients.
The original notebook standardises each cohort using its own gene means and standard deviations. This demo preserves those frozen cohort values. A single new patient would need a separately validated reference-based preprocessing procedure.
The small test cohort has 18 Gram-positive bacterial cases and 41 viral cases. The study has not established performance in Kenyan children or against malaria and other infections.
Model scores have not been validated as clinical probabilities. The threshold control is for exploration, not treatment decisions.
Reproducible research
NCBI GEO test datasetNCBI GEO discovery datasetGroup Nine repository