LANVAR
← The shelf

microbiome classifier

Did its thing

Reading disease out of gut bacteria: a neural network over 1,094 microbial abundance features, with SMOTE fixing a brutally imbalanced dataset.

PythonTensorFlowscikit-learn 2022
How it actually works
THE DATA 7,840 samples · 1,094 bacterial features THE MODEL HEALTHY DISEASE 1 DISEASE 2 DISEASE 3 FEEDFORWARD NET 1,094 → 500 → 175 → 75 → 4-way softmax CLASS BALANCE 6 : 1 · SKEWED 1 : 1 · REBALANCED 1 : 1 · REBALANCED F1 0.905 10-FOLD CV · κ 0.875 F1 0.905 10-FOLD CV · κ 0.875 dotted tops are synthetic — SMOTE lifts every minority up to the dashed line
FIG 1 · the rebalance, animated — fake the minorities until the net can count
7,840 samples 1,094 bacterial features, healthy vs 3 diseases (6:1 skew) SMOTE synthesize the minorities feedforward net 1094 → 500 → 175 → 75 → 4-way softmax F1 ≈ 0.905 κ ≈ 0.875 10-fold cross-validation DT · KNN · SVM · NB left behind the imbalance is the real boss fight — SMOTE is how you beat it
FIG 2 · the machinery — imbalanced samples → SMOTE → deep classifier → CV score
The story

A PharmaHacks-era challenge: 7,840 gut-microbiome samples, each described by 1,094 bacterial abundance features, labelled healthy or one of three disease classes — with healthy samples outnumbering the rarest disease six to one.

The imbalance is the real boss fight. SMOTE synthesizes minority-class samples to level the classes, and a feedforward network (1,094 → 500 → 175 → 75 → 4-way softmax) does the classifying. Ten-fold cross-validation landed at F1 ≈ 0.905 with decision trees, KNN, SVM, and naive Bayes baselines left behind in sibling folders as the receipts.