# Causal Discovery

Causal Discovery finds the inbound causes and outbound effects behind core concepts across your data. It builds a causal graph from unified data views generated by the ontology, combining domain rules with statistical evidence, and produces a PDAG (Partially Directed Acyclic Graph). This graph is then explored, adjusted, and validated before serving as the foundation for simulations in the Digital Twin.

Put simply, RootCause.ai automatically builds a chart of what things impact others. This is the basis for running detailed and fully explainable simulations.

To begin, select a Data View under *Data* and click Discover Causal Relationships.

***

#### Definition & Purpose

Causal Discovery goes beyond correlation. It identifies which factors truly cause outcomes to change, helping you:

* Prioritize interventions on drivers that move the needle
* Filter out noise and redundant relationships
* Keep results explainable and auditable for business and technical users

***

#### How Causal Discovery Works

Causal Discovery unfolds in three stages. First, it applies basic rules like "time moves forward" and filters out variables without meaningful connections. This creates a foundation of only plausible relationships.

Next, an optimization algorithm searches through the remaining variables to identify the clearest cause-and-effect paths, while pruning away duplicates or weak links.

Finally, the system validates the graph by producing a PDAG (Partially Directed Acyclic Graph). Edges are directed only when the evidence is strong; otherwise, the link is left undirected.

***

#### Editing & Oversight

Causal graphs aren’t static. RootCause.ai provides controls to incorporate domain knowledge:

* Edit assumptions: Add dependencies or break them to test scenarios
* Known relationships: Declare edges that must exist
* Blocked relationships: Forbid edges that should never exist

Any changes automatically trigger a re-run of the model with updated instructions. This ensures the causal model reflects both statistical evidence and expert judgment.

***

#### Outputs & Views

When discovery is complete, the causal graph can be explored and evaluated:

**Explore**

* Flow Chart or DAG View for interactive navigation
* Path Analysis: Sankey diagrams showing incoming and outgoing causal paths with contribution weights
* Model Probabilities: Learned distributions or parameters for each node

**Evaluate**

* Graph- and node-level metrics
* Categorical targets: Accuracy, AUC
* Numeric targets: MSE, MAE, R², log-likelihood
* Highlights strong and weak areas to guide refinement (e.g. adding priors, blocking edges)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rootcause.ai/core-technologies/causal-discovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
