a machine learning toolbox for inferring highly personalized statistical models.

A statistical machine learning toolbox for estimating models, distributions, and functions with context-specific parameters.

Check out our latest release here. To learn more, take a look at the main demo for a complete overview with code, or the easy demo for a quickstart with sklearn-style wrappers!

Implemented by Caleb Ellington (CMU) and Ben Lengerich (MIT).

Install and Use Contextualized

pip install git+

Contextualized Family

Context-dependent modeling is a universal problem, but every domain presents unique challenges and opportunities. Here are some layers that others have added on top of Contextualized. Feel free to add your own page(s) by sending a PR. Contextualized and analytical tools for modeling medical and biological heterogeneity

Lengerich, Benjamin J., Mark E. Nunnally, Yin Aphinyanaphongs, Caleb Ellington, and Rich Caruana. 2022. “Automated Interpretable Discovery of Heterogeneous Treatment Effectiveness: A COVID-19 Case Study.” Journal of Biomedical Informatics, April, 104086.

Lengerich, Ben, Caleb Ellington, Bryon Aragam, Eric P. Xing, and Manolis Kellis. 2021. “NOTMAD: Estimating Bayesian Networks with Sample-Specific Structures and Parameters.” arXiv [stat.ML]. arXiv.

Lengerich, Benjamin J., Maruan Al-Shedivat, Amir Alavi, Jennifer Williams, Sami Labbaki, and Eric P. Xing. 2020. “Discriminative Subtyping of Lung Cancers from Histopathology Images via Contextual Deep Learning.” medRxiv.

Al-Shedivat, Maruan, Avinava Dubey, and Eric P. Xing. 2018. “Personalized Survival Prediction with Contextual Explanation Networks.” arXiv [cs.LG]. arXiv.

Al-Shedivat, Maruan, Avinava Dubey, and Eric Xing. 2020. “Contextual Explanation Networks.” Journal of Machine Learning Research: JMLR 21 (194): 1–44.