EphAsad's picture
Update README.md
dd9231a verified
|
Raw
History Blame Contribute Delete
1.82 kB
---
title: BacterialIdentifierShowcase
emoji: 🐨
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: 6.14.0
python_version: '3.13'
app_file: app.py
pinned: false
license: apache-2.0
---
# PhenotypeClassifier Complete Package
PhenotypeClassifier is a phenotype-based bacterial genus prediction tool.
This package includes:
- `phenotype_tinytransformer_v1_temperature_scaled.pt` β€” calibrated TinyTransformer model
- `phenotype_inference.py` β€” reusable inference module
- `phenotype_next_tests.py` β€” model-based next-test recommender
- `phenotype_reference_distributions.json` β€” compact phenotype distribution reference
- `example_usage.py` β€” simple example script
- `requirements.txt` β€” dependencies
## What it does
Given structured phenotype fields, it predicts likely bacterial genus and returns:
- Top genus
- Ranked genera
- Confidence
- Distinctness
- Missing fields
- Discriminatory next-test recommendations
- Confirmation next-test recommendations
## Run example
```bash
pip install -r requirements.txt
python example_usage.py
```
## Python usage
```python
from phenotype_inference import PhenotypeClassifier
from phenotype_next_tests import PhenotypeNextTestRecommender
classifier = PhenotypeClassifier('phenotype_tinytransformer_v1_temperature_scaled.pt')
recommender = PhenotypeNextTestRecommender(classifier, 'phenotype_reference_distributions.json')
features = {
'Gram Stain': 'Negative',
'Shape': 'Rods',
'Catalase': 'Positive',
'Oxidase': 'Positive',
}
prediction = classifier.predict(features)
recommendations = recommender.recommend(features)
```
## Important limitation
This is a phenotype-based genus prediction tool. It is not a confirmed laboratory identification, not a diagnostic result, and should not replace validated microbiology workflows.