CausalChange
causalchange provides implementations of some score-based algorithms for causal discovery,
with focus on addressing different forms of distribution shifts.
Setup
Install the core package with pip install causalchange, and with additional
dependencies for the resp. algorithms using pip install causalchange[spacetime] and pip install causalchange[cmm].
Quick Example
import numpy as np
import pandas as pd
from causalchange import Topic
rng = np.random.default_rng(0)
n = 300
# chain: X -> Y -> Z
x = rng.normal(size=n)
y = 2.0 * x + 0.2 * rng.normal(size=n)
z = -1.0 * y + 0.2 * rng.normal(size=n)
X = pd.DataFrame({"X": x, "Y": y, "Z": z})
cc = Topic(score_type="lin", seed=0)
cc.fit(X)
print("Topological order:", cc.topological_order_)
print("Edges:", sorted(cc.graph_.edges()))
Further Examples
See the notebooks/ for basic usage on small synthetic examples. The algorithms are
- TOPIC, for score-based causal DAG discovery from tabular data in topological order [1],
- LINC, for score-based causal discovery from multiple contexts, i.e., multiple tabular datasets under latent distribution shifts/interventions [2],
- CMM, for score-based causal discovery from latent mixtures, i.e., a tabular dataset comprised of different hidden populations/contexts/interventions [3].
- SpaceTime, for temporal causal discovery, changepoint detection, and causal clustering analysis in time series or multi-context time series [4].
Documentation
See the docs/ for additional documentation.
References
[1] Xu, S., Mameche, S., and Vreeken, J. Information-theoretic Causal Discovery in Topological Order. AISTATS, 2025.
[2] Mameche, S., Kaltenpoth, D., and Vreeken, J. Learning Causal Models under Independent Changes. NeurIPS, 2023.
[3] Mameche, S., Kalofolias, J., and Vreeken, J. Causal Mixture Models: Characterization and Discovery. NeurIPS, 2025.
[4] Mameche, S., Cornanguer, L., Ninad, U., and Vreeken, J. SpaceTime: Causal Discovery from Non-stationary Time Series. AAAI, 2025.
Metadata
Release files for causalchange 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| causalchange-0.1.1.tar.gz | 60.8 kB | Without provenance | Details for causalchange-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| causalchange-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for causalchange-0.1.1-py3-none-any.whl |
Total release size: 134.8 kB
Release files / causalchange-0.1.1.tar.gz
| Download URL | causalchange-0.1.1.tar.gz |
|---|---|
| Size | 60.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abd5a6fa502544c735fbac73758f5ceae3c85d9c8ed4390cfd4ca1081bdf7f23
|
|
BLAKE2b-256 checksum How to use checksums |
537930a1c5d5424809b8f82dd54cd21f059298d7eb0617ab837d495d1ee74c76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / causalchange-0.1.1-py3-none-any.whl
| Download URL | causalchange-0.1.1-py3-none-any.whl |
|---|---|
| Size | 74.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ac4a5b70c102e0a61245f07b100ac3359bb24be6be9d5df4d5e3946fe69ffd1
|
|
BLAKE2b-256 checksum How to use checksums |
0780835b51e7a17a1e3df107c8b99f36c43011392c6d62434b9ca7d565d03b68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Security for causalchange 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.