Skip to content

scverse/formulaic-contrasts

formulaic-contrasts

Tests Documentation codecov.io

Build arbitrary contrasts for models defined with formulaic.

Getting started

Please refer to the documentation. As a developer seeking to use formulaic-contrasts with your model, you'll find the API documentation and the tutorial Usage in custom model useful. If you are a user who wants to understand how to build contrasts for a model, the building contrasts tutorial is for you!

Installation

Typically, you don't install formulaic-contrasts directly, but obtain it as a dependency of another model. As a developer, you can obtain it from PyPI or GitHub:

There are several alternative options to install formulaic-contrasts:

  1. Install the latest release of formulaic-contrasts from PyPI:
pip install formulaic-contrasts
  1. Install the latest development version:
pip install git+https://github.com/scverse/formulaic-contrasts.git@main

Formulaic-contrasts depends on Python 3.10 or later.

Release notes

See the changelog.

Contact

For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.

Credits

The cond() function for building contrasts has been devised by @const-ae for his R package glmGamPoi. A prototype of the Python implementation has been built at the scverse hackathon in Cambridge, UK in Nov 2023 by @grst, @const-ae and @BorisMuzellec. The production version in this package has been implemented by @grst.

About

Build contrasts for models defined with formulaic

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages