Cegpy
Cegpy (/segpaɪ/) is a Python package for working with Chain Event Graphs. It supports learning the graphical structure of a Chain Event Graph from data, encoding of parametric and structural priors, estimating its parameters, and performing inference.
Install / Use
/learn @g-walley/CegpyREADME
cegpy
Cegpy (/segpaɪ/) is a Python package for working with Chain Event Graphs. It supports learning the graphical structure of a Chain Event Graph from data, encoding of parametric and structural priors, estimating its parameters, and performing inference.
It is built on top of the Python network modelling package NetworkX.
Documentation
Documentation is hosted on read the docs.
We have also written a paper to explain the statistical methods and algorithms included in the package; ARXIV - cegpy: Modelling with Chain Event Graphs in Python.
Quickstart
If you'd like to get started using the packages, the best place to start is the quick-start documentation.
Example Binder
Use cases have been demonstrated in a binder.
The following image is an example of a chain event graph that is produced by this package:

Contributors ✨
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://ashenvi10.github.io/"><img src="https://avatars.githubusercontent.com/u/39489147?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aditi Shenvi</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=ashenvi10" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/commits?author=ashenvi10" title="Tests">⚠️</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Aashenvi10" title="Bug reports">🐛</a> <a href="#projectManagement-ashenvi10" title="Project Management">📆</a></td> <td align="center"><a href="https://github.com/g-walley"><img src="https://avatars.githubusercontent.com/u/83537018?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gareth Walley</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Documentation">📖</a> <a href="#design-g-walley" title="Design">🎨</a> <a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Tests">⚠️</a> <a href="#maintenance-g-walley" title="Maintenance">🚧</a></td> <td align="center"><a href="https://github.com/kasia-kobalczyk"><img src="https://avatars.githubusercontent.com/u/62558622?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kasia Kobalczyk</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=kasia-kobalczyk" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Akasia-kobalczyk" title="Bug reports">🐛</a> <a href="https://github.com/g-walley/cegpy/commits?author=kasia-kobalczyk" title="Tests">⚠️</a></td> <td align="center"><a href="https://github.com/peterrhysstrong"><img src="https://avatars.githubusercontent.com/u/43751009?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peter Strong</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=peterrhysstrong" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Apeterrhysstrong" title="Bug reports">🐛</a> <a href="#example-peterrhysstrong" title="Examples">💡</a> <a href="https://github.com/g-walley/cegpy/commits?author=peterrhysstrong" title="Tests">⚠️</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->This project follows the all-contributors specification. Contributions of any kind welcome!
Related Skills
openhue
352.0kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
352.0kElevenLabs text-to-speech with mac-style say UX.
weather
352.0kGet current weather and forecasts via wttr.in or Open-Meteo
casdoor
13.3kAn open-source AI-first Identity and Access Management (IAM) /AI MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
