Tools for analysing and visualising causal graphs
Project description
causaliq-analysis
This repo provides tools for analysing and visualising learned causal graphs, including structural metrics, stability assessment, significance tests, and publication-ready tables and charts. It is part of the CausalIQ ecosystem for intelligent causal discovery.
Status
Current Version: v0.3.0
This repository is part of the CausalIQ ecosystem and is in active development. Recent work has focused on graph merging functionality and migration from the legacy discovery repo.
Features
✅ Implemented Releases
- Release v0.3.0 - Graph Merging: Merge multiple DAGs/PDAGs/PDGs into probabilistic dependency graphs (PDGs) with weighted edge probabilities. Trace migration to convert legacy traces to modern GraphML format.
- Release v0.2.0 - Legacy Trace: Support for reading and writing structure learning traces in legacy pickle format.
- Release v0.1.0 - Foundation Metrics: CausalIQ and Bayesys structural graph metrics and KL metric.
🛣️ Upcoming Releases
- Release v0.4.0 - Optimal Extraction & Evaluation: Extract best DAG/CPDAG from PDGs, structural evaluation metrics (F1, precision, recall) vs ground truth.
Upcoming Key Innovations
🧠 LLM-assisted Graph Averaging
- Uncertain or conflicting edges - resolved using LLM queries
📊 Publication-ready chart generation
- Seaborn charts - flexible, but standardised publication-ready chart generation
▦ Publication-ready table generation
- LaTeX tables - converts tabular analysis data into publication-ready LaTeX tables
Integration with CausalIQ Ecosystem
- 🔍 CausalIQ Discovery generates causal graphs which this package evaluates and visualises.
- 🤖 CausalIQ Workflow can access all features of this package (through the Action interface) so that analysis and visualisation are incorporated into CausalIQ workflows.
- 🧪 CausalIQ Papers uses the analysis, table and chart features of this package to generate published paper assets.
LLM Support
The following provides project-specific context for this repo which should be provided after the personal and ecosystem context:
I wish to migrate the code in legacy/core/metrics.py following all CausalIQ development guidelines
so that the legacy repo can use the migrated code instead.
Quick Start
# to be completed
Getting started
Prerequisites
- Git
- Latest stable versions of Python 3.9, 3.10. 3.11, 3.12 or 3.13
Clone the new repo locally and check that it works
Clone the causaliq-analysis repo locally as normal
git clone https://github.com/causaliq/causaliq-analysis.git
Set up the Python virtual environments and activate the default Python virtual environment. You may see messages from VSCode (if you are using it as your IDE) that new Python environments are being created as the scripts/setup-env runs - these messages can be safely ignored at this stage.
scripts/setup-env -Install
scripts/activate
Check that the causaliq-analysis CLI is working, check that all CI tests pass, and start up the local mkdocs webserver. There should be no errors reported in any of these.
causaliq-analysis --help
scripts/check_ci
mkdocs serve
Enter http://127.0.0.1:8000/ in a browser and check that the causaliq-data documentation is visible.
If all of the above works, this confirms that the code is working successfully on your system.
Documentation
Full API documentation is available at: http://127.0.0.1:8000/ (when running mkdocs serve)
Contributing
This repository is part of the CausalIQ ecosystem. For development setup:
- Clone the repository
- Run
scripts/setup-env -Installto set up environments - Run
scripts/check_cito verify all tests pass - Start documentation server with
mkdocs serve
Supported Python Versions: 3.9, 3.10, 3.11, 3.12, 3.13
Default Python Version: 3.11
License: MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file causaliq_analysis-0.3.0.tar.gz.
File metadata
- Download URL: causaliq_analysis-0.3.0.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
668f3282f6d2ce34ea97d827254a9e9c3ebe585ebae89144a657bea7d820c8f9
|
|
| MD5 |
84b7359f1c1bf44ab5a41e5a1fa34e19
|
|
| BLAKE2b-256 |
910f99582ed6e7338de70ee1032d2289dc9656ec9088607cf751ab5736f5ca3f
|
File details
Details for the file causaliq_analysis-0.3.0-py3-none-any.whl.
File metadata
- Download URL: causaliq_analysis-0.3.0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36c05d6b2ed600dc83fa8e07e048c39e8f38dfba5b0d25498cc57bc5b1224fb7
|
|
| MD5 |
f06e2110692955f535820ae6cb61203f
|
|
| BLAKE2b-256 |
b7a76c39c04fb76f4e8c387b6081a720ede6795fb4b9a4bc30a9f04e443a96b1
|