CausalNex
Use this skill when the task names CausalNex, NOTEARS, DYNOTEARS, BayesianNetwork, InferenceEngine, Discretiser, DAGClassifier, DAGRegressor, BayesianNetworkClassifier, causal DAG learning, or Bayesian-network workflows from this package.
Route by task
- Structure learning from tabular or time-series data ->
sub-skills/structure-learning/SKILL.md
- Bayesian-network fitting, inference, metrics, plots, and latent-variable EM ->
sub-skills/bayesian-networks/SKILL.md
- Discretizing continuous features, including tree-based or MDLP splits ->
sub-skills/discretization/SKILL.md
- Synthetic DAG/data generation, dynamic transforms, and categorical mapping ->
sub-skills/synthetic-data/SKILL.md
- Contrib-area or contribution-layout questions ->
references/contribution-mirror.md
Fast start
- Install the package with
pip install causalnex.
- If you need the optional discretizer extras, install
pip install "causalnex[all]" or pip install mdlp-discretization~=0.3.3.
- Run
scripts/check_install.py to confirm the core imports and optional backend availability.
- Read
references/installation.md for supported Python and dependency notes.
- Read
references/api-reference.md when you need verified public constructors, signatures, and return-shape notes.
- Read
references/workflows.md for the shortest path into each workflow.
- Read
references/contribution-mirror.md only when the user asks about causalnex.contrib or contribution layout.
- Read
references/troubleshooting.md when imports, optional dependencies, or data-shape checks fail.
- Read
references/repo-provenance.md when you need to compare this skill with the current source revision.
Shared scripts
scripts/check_install.py verifies the public package imports, torch availability, and the optional MDLP dependency.
scripts/smoke_structure_learning.py exercises from_pandas, from_numpy, from_pandas_dynamic, DAGClassifier, and DAGRegressor on tiny inputs.
scripts/smoke_bayesian_network.py fits a tiny Bayesian network, queries marginals, evaluates metrics, and optionally exercises latent-variable EM.
scripts/smoke_discretizer.py exercises the fixed, uniform, quantile, outlier, percentiles, tree, and MDLP discretizers.
scripts/smoke_synthetic_data.py exercises the DAG/data generators, dynamic transforms, and categorical mapping helpers.
References
references/installation.md
references/api-reference.md
references/workflows.md
references/contribution-mirror.md
references/troubleshooting.md
references/repo-provenance.md
references/repo-routing-metadata.json
Avoid
- Do not assume CUDA is required;
use_gpu=True falls back to CPU when CUDA is unavailable.
- Do not assume
mdlp-discretization is installed unless you asked for the optional discretizer path.
- Do not rely on the original repository checkout; this skill should stand on its bundled references and scripts.
1---2name: causalnex3description: "Use CausalNex to learn causal structures, fit Bayesian networks,4 discretize features, generate synthetic graph data, and run inference,5 evaluation, and latent-variable workflows."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/causalnex9 disco-role: operating10license: NOASSERTION11---1213# CausalNex1415Use this skill when the task names CausalNex, NOTEARS, DYNOTEARS, `BayesianNetwork`, `InferenceEngine`, `Discretiser`, `DAGClassifier`, `DAGRegressor`, `BayesianNetworkClassifier`, causal DAG learning, or Bayesian-network workflows from this package.1617## Route by task1819- Structure learning from tabular or time-series data -> `sub-skills/structure-learning/SKILL.md`20- Bayesian-network fitting, inference, metrics, plots, and latent-variable EM -> `sub-skills/bayesian-networks/SKILL.md`21- Discretizing continuous features, including tree-based or MDLP splits -> `sub-skills/discretization/SKILL.md`22- Synthetic DAG/data generation, dynamic transforms, and categorical mapping -> `sub-skills/synthetic-data/SKILL.md`23- Contrib-area or contribution-layout questions -> `references/contribution-mirror.md`2425## Fast start26271. Install the package with `pip install causalnex`.282. If you need the optional discretizer extras, install `pip install "causalnex[all]"` or `pip install mdlp-discretization~=0.3.3`.293. Run `scripts/check_install.py` to confirm the core imports and optional backend availability.304. Read `references/installation.md` for supported Python and dependency notes.315. Read `references/api-reference.md` when you need verified public constructors, signatures, and return-shape notes.326. Read `references/workflows.md` for the shortest path into each workflow.337. Read `references/contribution-mirror.md` only when the user asks about `causalnex.contrib` or contribution layout.348. Read `references/troubleshooting.md` when imports, optional dependencies, or data-shape checks fail.359. Read `references/repo-provenance.md` when you need to compare this skill with the current source revision.3637## Shared scripts3839- `scripts/check_install.py` verifies the public package imports, `torch` availability, and the optional MDLP dependency.40- `scripts/smoke_structure_learning.py` exercises `from_pandas`, `from_numpy`, `from_pandas_dynamic`, `DAGClassifier`, and `DAGRegressor` on tiny inputs.41- `scripts/smoke_bayesian_network.py` fits a tiny Bayesian network, queries marginals, evaluates metrics, and optionally exercises latent-variable EM.42- `scripts/smoke_discretizer.py` exercises the fixed, uniform, quantile, outlier, percentiles, tree, and MDLP discretizers.43- `scripts/smoke_synthetic_data.py` exercises the DAG/data generators, dynamic transforms, and categorical mapping helpers.4445## References4647- `references/installation.md`48- `references/api-reference.md`49- `references/workflows.md`50- `references/contribution-mirror.md`51- `references/troubleshooting.md`52- `references/repo-provenance.md`53- `references/repo-routing-metadata.json`5455## Avoid5657- Do not assume CUDA is required; `use_gpu=True` falls back to CPU when CUDA is unavailable.58- Do not assume `mdlp-discretization` is installed unless you asked for the optional discretizer path.59- Do not rely on the original repository checkout; this skill should stand on its bundled references and scripts.