Skip to contents

Model

Main user-facing class.

KaguModel
KaguModel - Bayesian graphical causal model

Mechanisms

Probabilistic models for node conditional distributions.

Mechanism
Mechanism abstract base class
GPMechanism
Gaussian-process mechanism (default)

Effects

Causal effect estimation and results.

EffectResult
Result of a causal effect query
compute_effect()
Compute the causal effect of source on target

Structure discovery

Posterior over DAGs via marginal-likelihood model comparison.

kagu_discover()
Discover causal structure from data
DiscoveryResult
Result of a causal structure search
enumerate_dags()
Enumerate all DAGs over a set of nodes
kagu_plot_discovery()
Plot the posterior distribution over DAGs

DAG utilities

Graph operations on DAG specifications.

validate_dag()
Validate a DAG specification
topological_sort()
Topological sort (Kahn's algorithm)
ancestors()
Ancestors of a node
descendants()
Descendants of a node
is_ancestor()
Test whether one node is an ancestor of another
node_depth()
Depth of each node in the DAG

Plots

kagu_plot_dag()
Plot the DAG structure
kagu_plot_posterior()
Plot a fitted node's summary terms

Save / load

kagu_save()
Save a fitted model to disk
kagu_load()
Load a model saved with kagu_save()

Fitting

fit_node()
Fit a single node's conditional distribution

Summaries

build_summary_table()
Build a per-node summary table across all nodes

Internal

File-level documentation pages.

dag
DAG validation and graph utilities
discover
Causal structure discovery
effects
Causal effect estimation via the do-operator
inference
Per-node model fitting
io
Save and load fitted KaguModel objects
mechanisms
Mechanism base class and the Gaussian-process implementation
plots
DAG and posterior visualisation
summary
Summary table for a fitted KaguModel