Skip to main content

IWU Tests License PyPi Python Downloads


Logo

causalgraph

A python package for modeling, persisting and visualizing causal graphs embedded in knowledge graphs.

GitHub Repository · Contact us

Table of contents
  1. About the Project
  2. Getting started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Similar Projects
  8. Acknowledgments
  9. Citing this project

About the project

causalgraph - modeling and saving causal graphs embedded in knowledge graphs. The package has been designed to provide an interface between causal disciplines such as causal discovery and causal inference. With this package, users can create and save causal graphs and export the generated graphs for use in other graph-based packages. The main advantage of the proposed package is its ability to facilitate the linking of additional information and metadata to causal structures. In addition, the package offers a variety of functions for graph modeling and plotting, such as editing, adding, and deleting nodes and edges. It is also compatible with widely used graph data science libraries such as NetworkX and Tigramite and incorporates a specially developed causalgraph ontology in the background.

Getting started

You can either use the causalgraph source code directly, or install the python package using pip.

Using pip

Just install causalgraph via pip running the following command:

pip install causalgraph

Local source code

  1. Clone the repo
    git clone https://github.com/causalgraph/causalgraph.git
    
  2. Create conda environment
    conda env create -f environment.yml
    conda activate causalgraph
    
  3. Ready to use causalgraph
    import causalgraph
    

Usage

Please have a look at the examples within the GitHub Repo . Here you can find some Jupyter notebooks in which the most important functions are presented. You can also take a look at the causalgraph paper. It is referenced in the end of this README.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the GitHub repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License.

Contact

Similar projects

  • owlready2 - Makes Ontologies and Knowledge Graphs workable in python. Is used for storing information
  • networkX - Represent graphs in python; is used as inspiration for the Calls and structure of the project
  • Causal Graphical Models Python Package - Major inspiration for this package, but we want to do these things differently:
    • Represent Nodes and Edges as individual objects, establishing the connection to datasources / models
    • usage of networkX MultiDiGraph as base for the SCMs to support multiple connections (at different times) between nodes
  • Causal Inference in Statistics - Python Code accompanying a book, which also implements SCMs (without Time-Series)

Acknowledgments

The development of causalgraph is part of the research project KausaLAssist. It is funded by the German Federal Ministry of Education and Research (BMBF) within the "Future of Value Creation - Research on Production, Services and Work" program (funding number 02P20A150) and managed by the Project Management Agency Karlsruhe (PTKA). The authors are responsible for the content of this publication.

Citing this project

If you find causalgraph useful for your research, please cite us as follows:

Sven Pieper, Carl Willy Mehling, Dominik Hirsch, Tobias Lüke, Steffen Ihlenfeldt. causalgraph: A Python Package for Modeling, Persisting and Visualizing Causal Graphs Embedded in Knowledge Graphs. 2023. https://arxiv.org/abs/2301.08490

DOI: 10.48550/arXiv.2301.08490

Bibtex:

@misc{
  doi = {10.48550/ARXIV.2301.08490},
  url = {https://arxiv.org/abs/2301.08490},
  author = {Pieper, Sven and Mehling, Carl Willy and Hirsch, Dominik and Lüke, Tobias and Ihlenfeldt, Steffen},
  keywords = {Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS: Computer and information sciences, E.1; E.2},
  title = {causalgraph: A Python Package for Modeling, Persisting and Visualizing Causal Graphs Embedded in Knowledge Graphs},
  publisher = {arXiv},
  year = {2023}
}

Metadata

Release files for causalgraph 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for causalgraph 0.1.1
File Size Uploaded Provenance Actions
causalgraph-0.1.1.tar.gz 44.2 kB Without provenance Details for causalgraph-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for causalgraph 0.1.1
File Interpreter ABI Platform Actions
causalgraph-0.1.1-py3-none-any.whl Python 3 none any Details for causalgraph-0.1.1-py3-none-any.whl

Total release size: 89.1 kB

Release files / causalgraph-0.1.1.tar.gz

Download URL causalgraph-0.1.1.tar.gz
Size 44.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4b4aa54cd1fdc879b41ccf375dd084fcd93cf8a41ac4e51a5c2b936857ecd956
BLAKE2b-256 checksum
How to use checksums
891924c572ab1f57a6f0fcd255b29e1fbfc12ea6496d8bf301e1a351cc9ba472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / causalgraph-0.1.1-py3-none-any.whl

Download URL causalgraph-0.1.1-py3-none-any.whl
Size 44.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3fd62b0eed9b8ae3c802069b2583dedd96293b2a0053c62809c19906aec2c76
BLAKE2b-256 checksum
How to use checksums
09220a6ef8087a50197b15db8018d790e10a4785437ae5d71aeec3373e397663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for causalgraph 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page