Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
The dataset viewer is not available for this split.
The number of columns (2362) exceeds the maximum supported number of columns (1000). This is a current limitation of the datasets viewer. You can reduce the number of columns if you want the viewer to work.
Error code:   TooManyColumnsError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Human Gut Microbiome Dataset (40-class)

Pre-processed, train/val/test-split human gut microbiome dataset used to train and evaluate MicrobiomeFM, a Transformer-based foundation model for multi-class disease classification from shotgun metagenomic data.

This release contains the 40-class filtered version of the dataset that the published results were obtained on (test accuracy ≈ 96.05%, weighted F1 ≈ 0.950, macro F1 ≈ 0.691). It is derived from the curatedMetagenomicData (cMD) Bioconductor resource by removing disease classes with fewer than 20 samples and re-stratifying into 70/15/15 train/val/test splits.


Dataset Summary

Item Value
Total samples 14,488
Number of features 2,361 (1,260 categorical + 1,101 numerical)
Number of disease classes 40
Target column disease (integer label, 0–39)
Train / Val / Test 10,136 / 2,176 / 2,176
Split strategy Stratified 70 / 15 / 15 (random seed 42)
Source curatedMetagenomicData (Bioconductor), shotgun stool metagenomics

Files

File Description
train.csv Training split — 10,136 rows, 2,362 columns (2,361 features + disease).
val.csv Validation split — 2,176 rows.
test.csv Held-out test split — 2,176 rows.
metadata.json Feature schema: lists of categorical/numerical feature names, vocab_sizes for every categorical column, and counts (n_features, n_train, n_val, n_test, n_classes).
disease_mapping.json name_to_id and id_to_name lookups for the 40 disease labels.

All preprocessing (categorical integer encoding, numerical standardization to zero mean and unit variance, removal of identifier and >95%-missing columns) was performed on the training set only to avoid leakage. Numerical missing values were filled with zero; missing categorical values were treated as a separate category.


Disease Classes

40 classes covering metabolic, cardiovascular, gastrointestinal, neurological, autoimmune and infectious conditions, plus the healthy control class. The full list (40 entries) is in disease_mapping.json. Some examples:

0: ACVD          5: CRC           10: IBD          15: T1D          20: cirrhosis
1: BD            6: CRC;T2D       11: MS           16: T2D          ...
2: CAD           7: CRC;hyperten. 12: PD           17: T2D;adenoma  39: respiratoryinf

Loading

With pandas

import pandas as pd, json

train = pd.read_csv("train.csv")
val   = pd.read_csv("val.csv")
test  = pd.read_csv("test.csv")

with open("metadata.json")        as f: meta    = json.load(f)
with open("disease_mapping.json") as f: mapping = json.load(f)

X_cols = meta["categorical_features"] + meta["numerical_features"]
y_col  = meta["target_column"]   # 'disease'

With datasets

from datasets import load_dataset
ds = load_dataset("mohitraiyani27/Human_Gut_Microbiome_Data")

How the splits were produced

  1. Start from the cMD-aggregated dataset (14,855 samples, 131 disease classes, 2,361 features after preprocessing).
  2. Drop any disease class with fewer than 20 samples (eliminates rare and single-sample classes that cannot be learned).
  3. Remap the remaining 40 class labels to a clean 0–39 range.
  4. Stratified 70 / 15 / 15 split with random_state=42.

Intended Use

  • Training and benchmarking transformer / foundation-model architectures on heterogeneous tabular metagenomic data.
  • Multi-class disease classification from gut microbiome profiles.

Not intended for direct clinical decision-making. Class labels are research-grade study annotations from the underlying cMD resource.


Reference Code

Training and evaluation code (Chunked Feature Embedding + Masked Chunk Autoencoding pre-training + Attention-Pooling fine-tuning) is published at:

Run order:

pip install -r requirements.txt
python Complete_Architecture/pretrain.py
python Complete_Architecture/finetune.py
python Complete_Architecture/evaluate.py

Citation

If you use this dataset, please cite the underlying curatedMetagenomicData resource and the MicrobiomeFM paper:

@article{microbiomefm2026,
  title  = {MicrobiomeFM: A Transformer Foundation Model for Microbiome Disease Classification},
  author = {Raiyani, Mohit and Sayed, Khaled},
  year   = {2026},
  institution = {University of New Haven}
}

@article{pasolli2017curatedmetagenomicdata,
  title   = {Accessible, curated metagenomic data through ExperimentHub},
  author  = {Pasolli, Edoardo and others},
  journal = {Nature Methods},
  year    = {2017}
}

License

Released under CC-BY-4.0. The underlying metagenomic data is sourced from the publicly available curatedMetagenomicData resource; please also respect the original study-level licenses and citation requirements documented there.

Downloads last month
91