RecursiveCausalDiscovery
Recursive causal discovery with Julia
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.4%) to scientific vocabulary
Keywords
Repository
Recursive causal discovery with Julia
Basic Info
- Host: GitHub
- Owner: sepehr78
- License: mit
- Language: Julia
- Default Branch: main
- Homepage: https://arxiv.org/abs/2403.09300
- Size: 3.92 MB
Statistics
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 1
- Releases: 2
Topics
Metadata Files
README.md
RecursiveCausalDiscovery.jl
A Julia implementation of Recursive Causal Discovery algorithms. Recursive Causal Discovery (RCD) is an efficient approach for causal discovery (i.e., learning a causal graph from data).
⚠️ This package is still under development! ⚠️
Overview
Comparison of RCD with the PC algorithm implemented in CausalInference.jl
The following plots show the F1 score (computed using true causal graph), and number of conditional independency (CI) tests done.

Implemented algorithms
- [x] Recursive Structure Learning (RSL)
- [x] Learning v-structures
- [x] Meek's rules
- [ ] MArkov boundary-based Recursive Variable ELimination (MARVEL)
- [ ] Latent MARVEL (L-MARVEL)
- [ ] Removable Order Learning (ROL)
Installation
Requires at least Julia 1.10
julia
julia> ]add RecursiveCausalDiscovery
How to use
The package so far has only one algorithm implemented: RSL-D, which can be called using the rsld function. The function takes the data matrix/table and a conditional independence test function as input, and returns the completed partially oriented directed acyclic graph (CPDAG) as output.
Simple example
In this example, a csv file named data.csv is loaded, and the RSL-D algorithm is used to learn the CPDAG. The conditional independence test is based on the Fisher's Z-test.
```julia using RecursiveCausalDiscovery using CSV using Tables
load data (columns are variables and rows are samples)
data = CSV.read("data.csv", Tables.matrix)
use a Gaussian conditional independence test
siglevel = 0.01 citest = (x, y, condvec, data) -> fisherz(x, y, condvec, data, siglevel)
learn the oriented causal graph using RSL
cpdag = rsld(data, ci_test) ```
See the examples/rslexamplewo_data.jl for a complete example.
Generating random data from DAG and learning from it
See the examples/rslexamplewo_data.jl for an example on how to generate a random DAG using the Erdos-Renyi model, generate random Gaussian data from it, and learning the CPDAG using RSL-D.
Citation
If you do use this package, please cite our work.
bibtex
@article{JMLR:v26:24-0384,
author = {Ehsan Mokhtarian and Sepehr Elahi and Sina Akbari and Negar Kiyavash},
title = {Recursive Causal Discovery},
journal = {Journal of Machine Learning Research},
year = {2025},
volume = {26},
number = {61},
pages = {1--65},
url = {http://jmlr.org/papers/v26/24-0384.html}
}
Acknowledgement
Thanks to Felix Wechsler for helping me with Julia and pushing me to implement RCD in Julia.
Owner
- Name: Sepehr
- Login: sepehr78
- Kind: user
- Repositories: 1
- Profile: https://github.com/sepehr78
EEE & Math undergrad student at Bilkent University. Researcher @Bilkent-CYBORG.
Citation (citation.cff)
cff-version: 1.2.0
title: Recursive Causal Discovery
message: 'If you use this code, please cite the following work.'
type: software
authors:
- family-names: Mokhtarian
given-names: Ehsan
- family-names: Elahi
given-names: Sepehr
- family-names: Akbari
given-names: Sina
- family-names: Kiyavash
given-names: Negar
identifiers:
- type: url
value: 'https://arxiv.org/abs/2403.09300'
description: ArXiv link
GitHub Events
Total
- Issues event: 1
- Watch event: 2
- Push event: 1
Last Year
- Issues event: 1
- Watch event: 2
- Push event: 1
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
juliahub.com: RecursiveCausalDiscovery
Recursive causal discovery with Julia
- Homepage: https://arxiv.org/abs/2403.09300
- Documentation: https://docs.juliahub.com/General/RecursiveCausalDiscovery/stable/
- License: MIT
-
Latest release: 0.2.0
published over 1 year ago
Rankings
Dependencies
- JuliaRegistries/TagBot v1 composite
- actions/checkout v3 composite
- codecov/codecov-action v4 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite