Contextualized

Contextualized: Heterogeneous Modeling Toolbox - Published in JOSS (2024)

https://github.com/cnellington/contextualized

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 13 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, medrxiv.org, sciencedirect.com, joss.theoj.org
  • Committers with academic emails
    2 of 14 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

bioinformatics machine-learning medical-informatics statistics

Scientific Fields

Sociology Social Sciences - 71% confidence
Earth and Environmental Sciences Physical Sciences - 40% confidence
Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

An SKLearn-style toolbox for estimating and analyzing models, distributions, and functions with context-specific parameters.

Basic Info
  • Host: GitHub
  • Owner: cnellington
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage: http://contextualized.ml/
  • Size: 96.3 MB
Statistics
  • Stars: 76
  • Watchers: 2
  • Forks: 13
  • Open Issues: 39
  • Releases: 13
Topics
bioinformatics machine-learning medical-informatics statistics
Created over 4 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License

README.md

Preview

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

An SKLearn-style toolbox for estimating and analyzing 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?

Most models can be contextualized. For example, linear regression is math Y = X\beta + \epsilon

Contextualized linear regression is math Y = X\beta(C) + \epsilon where the coefficients $\beta$ are now a function of context $C$, allowing the model to adapt to context-specific changes. Contextualized implements this for many types of statistical models, including linear regression, logistic regression, Bayesian networks, correlation networks, and Markov networks.

For more details, see the Contextualized Machine Learning whitepaper.

Quick Start

Installation

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() model.fit(C, X, Y, normalize=True) This builds a contextualized linear regression model by fitting a deep-learning model to generate context-specific coefficients $\beta(C)$.

Predict Context-Specific Parameters

model.predict_params(C)

See the docs for more examples.

Important links

Citing

If you use this software, please cite the software publication: @article{Ellington2024, doi = {10.21105/joss.06469}, url = {https://doi.org/10.21105/joss.06469}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {97}, pages = {6469}, author = {Caleb N. Ellington and Benjamin J. Lengerich and Wesley Lo and Aaron Alvarez and Andrea Rubbi and Manolis Kellis and Eric P. Xing}, title = {Contextualized: Heterogeneous Modeling Toolbox}, journal = {Journal of Open Source Software} }

Contributing

Add your own contributions by sending a PR or request an improvement by creating an issue. See CONTRIBUTING.md for more info.

Thanks to all our contributors

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

Beyond code contributions, many people have helped. Check out ACKNOWLEDGEMENTS.md!

Related Publications and Pre-prints

Videos

Contact Us

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

Owner

  • Name: Caleb Ellington
  • Login: cnellington
  • Kind: user
  • Location: Pittsburgh, PA
  • Company: Carnegie Mellon University

Computational Biology PhD Student, Carnegie Mellon University

JOSS Publication

Contextualized: Heterogeneous Modeling Toolbox
Published
May 08, 2024
Volume 9, Issue 97, Page 6469
Authors
Caleb N. Ellington ORCID
Carnegie Mellon University, USA
Benjamin J. Lengerich ORCID
Massachusetts Institute of Technology, USA, Broad Institute of MIT and Harvard, USA
Wesley Lo
Worcester Polytechnic Institute, USA
Aaron Alvarez
University of Cincinnati, USA
Andrea Rubbi
Cambridge University, UK
Manolis Kellis
Massachusetts Institute of Technology, USA, Broad Institute of MIT and Harvard, USA
Eric P. Xing
Carnegie Mellon University, USA, Mohamed bin Zayed University of Artificial Intelligence, UAE
Editor
Fabian Scheipl ORCID
Tags
Machine Learning Modeling Heterogeneous Context

GitHub Events

Total
  • Create event: 5
  • Release event: 1
  • Issues event: 2
  • Watch event: 8
  • Delete event: 2
  • Issue comment event: 27
  • Push event: 23
  • Pull request review comment event: 31
  • Pull request review event: 28
  • Pull request event: 18
  • Fork event: 6
Last Year
  • Create event: 5
  • Release event: 1
  • Issues event: 2
  • Watch event: 8
  • Delete event: 2
  • Issue comment event: 27
  • Push event: 23
  • Pull request review comment event: 31
  • Pull request review event: 28
  • Pull request event: 18
  • Fork event: 6

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 510
  • Total Committers: 14
  • Avg Commits per committer: 36.429
  • Development Distribution Score (DDS): 0.449
Past Year
  • Commits: 53
  • Committers: 7
  • Avg Commits per committer: 7.571
  • Development Distribution Score (DDS): 0.679
Top Committers
Name Email Commits
Caleb Ellington c****n@g****m 281
Ben Lengerich b****h@g****m 142
Peter Li p****i@P****l 17
wtt102 w****2@g****m 16
aaron10l a****4@g****m 15
Peter Li p****i@M****n 10
Andrea Rubbi A****i 9
juwayni lucman l****i@g****m 5
Peter Li p****i@w****u 5
Jason Paul Miller j****r@g****m 3
Peter Li p****i@w****u 3
PaulCCCCCCH p****h@g****m 2
Jannik Deuschel 6****C 1
Baiheng Chen 1****n 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 61
  • Total pull requests: 131
  • Average time to close issues: 5 months
  • Average time to close pull requests: 11 days
  • Total issue authors: 7
  • Total pull request authors: 11
  • Average comments per issue: 1.2
  • Average comments per pull request: 0.87
  • Merged pull requests: 111
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 22
  • Average time to close issues: 22 days
  • Average time to close pull requests: 12 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 1.67
  • Average comments per pull request: 1.5
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cnellington (33)
  • blengerich (22)
  • alexanderchang1 (2)
  • vexvexctor (1)
  • abhinadduri (1)
  • BaihengChen (1)
  • holl- (1)
Pull Request Authors
  • cnellington (57)
  • blengerich (34)
  • CheeseLee888 (12)
  • aaron10l (10)
  • wtt102 (6)
  • juwaynilucman (4)
  • jxmils (2)
  • BaihengChen (2)
  • fabian-s (2)
  • AndreaRubbi (1)
  • Samuel-WM (1)
Top Labels
Issue Labels
enhancement (21) bug (6) good first issue (5) documentation (4)
Pull Request Labels
codex (2) enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 53 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 11
  • Total maintainers: 1
pypi.org: contextualized-ml

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

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 53 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 10.1%
Average: 17.3%
Forks count: 19.6%
Downloads: 19.7%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/pylint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/unit-test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
docs/requirements.txt pypi
  • jupyter-book *
  • matplotlib *
  • numpy *
pyproject.toml pypi
  • dill *
  • igraph *
  • matplotlib *
  • numpy *
  • pytorch-lightning <=1.9.4
  • scikit-learn *
  • torch <=1.13.1
  • torchvision *