PT - JOURNAL ARTICLE AU - Albane Ruaud AU - Niklas Pfister AU - Ruth E Ley AU - Nicholas D Youngblut TI - Interpreting tree ensemble machine learning models with endoR AID - 10.1101/2022.01.03.474763 DP - 2022 Jan 01 TA - bioRxiv PG - 2022.01.03.474763 4099 - http://biorxiv.org/content/early/2022/01/04/2022.01.03.474763.short 4100 - http://biorxiv.org/content/early/2022/01/04/2022.01.03.474763.full AB - Tree ensemble machine learning models are increasingly used in microbiome science as they are compatible with the compositional, high-dimensional, and sparse structure of sequence-based microbiome data. While such models are often good at predicting phenotypes based on microbiome data, they only yield limited insights into how microbial taxa or genomic content may be associated. Results: We developed endoR, a method to interpret a fitted tree ensemble model. First, endoR simplifies the fitted model into a decision ensemble from which it then extracts information on the importance of individual features and their pairwise interactions and also visualizes these data as an interpretable network. Both the network and importance scores derived from endoR provide insights into how features, and interactions between them, contribute to the predictive performance of the fitted model. Adjustable regularization and bootstrapping help reduce the complexity and ensure that only essential parts of the model are retained. We assessed the performance of endoR on both simulated and real metagenomic data. We found endoR to infer true associations with more or comparable accuracy than other commonly used approaches while easing and enhancing model interpretation. Using endoR, we also confirmed published results on gut microbiome differences between cirrhotic and healthy individuals. Finally, we utilized endoR to gain insights into components of the microbiome that predict the presence of human gut methanogens, as these hydrogen-consumers are expected to interact with fermenting bacteria in a complex syntrophic network. Specifically, we analyzed a global metagenome dataset of 2203 individuals and confirmed the previously reported association between Methanobacteriaceae and Christensenellales. Additionally, we observed that Methanobacteriaceae are associated with a network of hydrogen-producing bacteria. Conclusion: Our method accurately captures how tree ensembles use features and interactions between them to predict a response. As demonstrated by our applications, the resultant visualizations and summary outputs facilitate model interpretation and enable the generation of novel hypotheses about complex systems. An implementation of endoR is available as an open-source R-package on GitHub (https://github.com/leylabmpi/endoR).Competing Interest StatementThe authors have declared no competing interest.RFrandom forestFSfeature selectionCVcross-validationTPtrue positiveTNtrue negativeFPfalse positiveFNfalse negativeBMIbody mass indexMLmachine LearningFSDfully simulated datasetAPartificial phenotypeDNAdeoxyribonucleic acid