Skip to main content

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

Project description


License python PyPI version Maintenance Downloads pylint Score Code style: black

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

Context-specific parameters:

  • Find hidden heterogeneity in data -- are all samples the same?
  • Identify context-specific predictors -- are there different reasons for outcomes?
  • Enable domain adaptation -- can learned models extrapolate to new contexts?

Quick Start


pip install contextualized-ml

Take a look at the easy demo for a quickstart with sklearn-style wrappers.

Build a Contextualized Model

from contextualized.easy import ContextualizedRegressor
model = ContextualizedRegressor(), X, Y)

Predict Context-Specific Parameters


See the docs for more examples.

Important links

Contextualized Family

Context-dependent modeling is a universal problem, and 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 or request an improvement by creating an issue. See for more information about the process of contributing to this project. Contextualized and analytical tools for modeling medical and biological heterogeneity

Thanks to all our contributors

ContextualizedML was originally implemented by Caleb Ellington (CMU) and Ben Lengerich (MIT).

Many people have helped. Check out!

Related Publications and Pre-prints


Contact Us

Please get in touch with any questions, feature requests, or applications by using the GitHub discussions page.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextualized_ml-0.2.6.tar.gz (17.3 MB view hashes)

Uploaded source

Built Distribution

contextualized_ml-0.2.6-py3-none-any.whl (57.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page