No retraction, correction or concern found when last checked on Oct 22, 2026.
q2-sample-classifier: machine-learning tools for microbiome classification and regression
Nicholas Bokulich, Matthew Dillon, Evan Bolyen and 3 more
Journal of Open Source Software · 2018 · CC BY
Abstract
Microbiome studies often aim to predict outcomes or differentiate samples based on their microbial compositions, tasks that can be efficiently performed by supervised learning methods. Here we present a benchmark comparison of supervised learning classifiers and regressors implemented in scikit-learn, a Python-based machine-learning library. We additionally present q2-sample-classifier, a plugin for the QIIME 2 microbiome bioinformatics framework, that facilitates application of the scikit-learn classifiers to microbiome data. Random forest, extra trees , and gradient boosting models demonstrate the highest performance for both supervised classification and regression of microbiome data. Automated feature selection and hyperparameter tuning enhance performance of most methods but may not be necessary under all circumstances. The q2-sample-classifier plugin makes these methods more accessible and interpretable to a broad audience of microbiologists, clinicians, and others who wish to utilize supervised learning methods for predicting sample characteristics based on microbiome composition. The q2-sample-classifier source code is available at https://github.com/qiime2/q2-sample-classifier . It is released under a BSD-3-Clause license, and is freely available including for commercial use.
Full text
From PubMed Central, U.S. National Library of Medicine, as current on Oct 22, 2026. Paragraph numbers are ours, so an answer can point at one.
Microbiome studies often aim to predict outcomes or differentiate samples based on their microbial compositions, tasks that can be efficiently performed by SL methods. The goal of SL is to train a machine learning model on a set of samples with known target values/class labels, and then use that model to predict the target values/class membership of additional, unlabeled samples. The ability to categorize new samples, as opposed to describing the structure of existing data, extends itself to many useful applications, e.g., the prediction of disease/susceptibility, crop productivity, wine chemical composition, or sample collection site; the identification of mislabeled samples in microbiome data sets; or tracking microbiota-for-age development in children.
We describe q2-sample-classifier, a QIIME 2 plugin to support SL tools for pattern recognition in microbiome data. This plugin provides several SL methods, automatic parameter tuning, feature selection, and various learning algorithms. The visualizations generated provide portable, shareable reports, publication-ready figures, and integrated decentralized data provenance. Additionally, integration as a QIIME 2 plugin streamlines data handling and supports the use of multiple user interfaces, including a prototype graphical user interface (q2studio), facilitating its use for non-expert users. The plugin is freely available under the BSD-3-Clause license at https://github.com/qiime2/q2-sample-classifier.
The q2-sample-classifier plugin is written in Python 3.5 and employs pandas and numpy for data manipulation, scikit-learn for SL and feature selection algorithms, scipy for statistical testing, and matplotlib and seaborn for data visualization. The plugin is compatible with macOS and Linux operating systems.
The standard workflow for classification and regression in q2-feature-classifier is shown in Figure 1. All q2-sample-classifier actions accept a feature table (i.e., matrix of feature counts per sample) and sample metadata (prediction targets) as input. Feature observations for q2-sample-classifier would commonly consist of microbial counts (e.g., ampliconsequence variants, operational taxonomic units, or taxa detected by marker-gene or shotgun metagenome sequencing methods), but any observation data, such as gene, transcript, protein, or metabolite abundance could be provided as input. Input samples are shuffled and split into training and test sets at a user-defined ratio (default: 4:1) with or without stratification (equal sampling per class label; stratified by default); test samples are left out of all model training steps and are only used for final model validation.
The user can enable automatic feature selection and hyperparameter tuning, and can select the number of cross-validations to perform for each (default = 5). Feature selection is performed using cross-validated recursive feature elimination via scikit-learn’s RFECV to select the features that maximize predictive accuracy. Hyperparameter tuning is automatically performed using a cross-validated randomized parameter grid search via scikit-learn’s RandomizedSearchCV to find hyperparameter permutations (within a sensible range) that maximize accuracy.
The following scikit-learn SL estimators are currently implemented in q2-sample-classifier: AdaBoost, Extra Trees, Gradient boosting, and Random Forest ensemble classifiers and regressors; linear SVC, linear SVR, and nonlinear SVR support vector machine classifiers/regressors; k-Neighbors classifiers/regressors; and Elastic Net, Ridge, and Lasso regression models.
References 30
- 1.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 2.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 3.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 4.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 5.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 6.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 7.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 8.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 9.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 10.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 11.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 12.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 13.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 14.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 15.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 16.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 17.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 18.
- 19.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 20.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 21.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 22.
- 23.
- 24.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 25.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 26.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 27.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 28.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 29.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 30.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
Cited by papers we hold 9
- Respiratory Microbiota Profiles Associated With the Progression From Airway Inflammation to Remodeling in Mice With OVA-Induced Asthma · 2021Not checked
- A catalogue of 1,167 genomes from the human gut archaeome · 2021Corrected
- RESCRIPt: Reproducible sequence taxonomy reference database management · 2021No notice
- Phylogenetic farming: Can evolutionary history predict crop rotation via the soil microbiome? · 2020Not checked
- The intestinal microbiome, weight, and metabolic changes in women treated by adjuvant chemotherapy for breast and gynecological malignancies · 2020Not checked
- QIIME 2 Enables Comprehensive End‐to‐End Analysis of Diverse Microbiome Data and Comparative Studies with Publicly Available Data · 2020No notice
- iMAP: an integrated bioinformatics and visualization pipeline for microbiome data analysis · 2019Not checked
- Man-made microbial resistances in built environments · 2019No notice
- q2-longitudinal: Longitudinal and Paired-Sample Analyses of Microbiome Data · 2018No notice
Reads
Read by people on this page
None yet.
Checked or read by AI through naulon
None yet.
A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.
Are you an author?
Is this your paper?
Claim it to add your note and be paid when agents cite it. Free.