> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/user-guide/creating-digital-twin.md).

# Build Digital Twin

The causal graph from Step 4 is a structural map — it shows which variables influence which others. A **Digital Twin** takes that structure and fits it with equations, giving you a runnable model you can interrogate with simulations. In RootCause, both happen in one run of the twin builder: **Discover & train** discovers the graph and trains the model in a single action.

Building the Digital Twin is largely automatic. Your main decisions are: which data and type of twin to build, what you already know about the causal structure, and which training options to enable.

***

## Open the twin builder

There are two ways into the same builder:

* From the top navigation bar, open **Digital Twins**, then click **New Digital Twin**.
* From the Ontology page's **Recommended Datasets** panel, click **Create & build twin** — this saves the recommendation as a dataset and opens the builder with it pre-selected.

<figure><img src="/files/LDrawcpEVkcWCUwOmZ3Z" alt="Digital Twins list showing one trained twin, Digital Twin - Customer Subscription info x Customer Details, with a New Digital Twin button"><figcaption><p>The Digital Twins list. Click <strong>New Digital Twin</strong> to begin.</p></figcaption></figure>

***

## The builder wizard

The builder walks four steps.

<figure><img src="/files/HPoj0HwRocOyx7Mm7BJW" alt="The twin builder&#x27;s Add domain knowledge and Review &#x26; run steps, with a plain-language recap of the data and variables and the Discover &#x26; train button"><figcaption><p>The twin builder. Choose a method, pick the data, add what you know, then review and run.</p></figcaption></figure>

**1. How do you want to build it?** Two methods:

* **Discover from data** *(default)* — causal discovery finds the graph from your data; anything you add is prior knowledge it must respect.
* **Build a graph by hand** — draw the causal graph yourself (or import it from a CSV) and train directly on it, with no discovery step.

**2. Choose your data.** Pick the Data View — the 360 Table you built in Step 3 — and the twin type:

| Type                       | When to use                                                                                         |
| -------------------------- | --------------------------------------------------------------------------------------------------- |
| Static                     | Data without meaningful time ordering — customer attributes, cross-sectional snapshots, survey data |
| Temporal                   | Time-series data where variables influence each other across periods — trends, lags, forecasting    |
| Multi-environment          | Many distinct groups (products, regions, stores) observed as snapshots                              |
| Multi-environment temporal | Many groups tracked over time — panel data                                                          |

The builder ticks every type your data supports and selects the most specific; types the data cannot support are disabled. Temporal types ask for a **time column**; multi-environment types ask for **environment columns**. See [Types of Digital Twins](/more-details/build-digital-twin/twin-types.md).

**3. Add domain knowledge** *(with discovery)* **or build your causal graph** *(by hand)*. On the discovery path this step is optional: set variable roles (drivers and outcomes), add known or impossible links, and declare event order — hints discovery must respect. On the by-hand path, this is where you draw the model itself.

**4. Review & run.** A plain-language recap of the data, variables, roles, and prior knowledge, with validation checks. **Advanced settings** holds the training options, algorithm versions, and parallelism controls — see [Configuration to Build Digital Twin](/more-details/build-digital-twin/build-configuration.md).

**Training options** (under Advanced settings):

* **Account for hidden factors** (confounder modeling) — detects and accounts for hidden variables that influence multiple observed variables. Recommended on.
* **Show the formula** (equation discovery) — fits symbolic equations to describe each relationship precisely. Recommended on.
* **Delayed effects** (lag discovery; temporal types, experimental) — finds effects that appear one or more time steps after their cause.

***

## Start training

The run button's label depends on the method you chose in step 1:

* **Discover & train** — runs discovery, then trains — one action. This is the normal path.
* **Train model** — trains directly on the graph you drew, with no discovery step.

(When modifying an existing twin, the same actions appear as **Re-discover & train** and **Retrain model**.)

Click **Discover & train** to proceed.

***

## Training progress

Training runs a sequence of stages — which ones depends on the training options you enabled.

<figure><img src="/files/hVamBs2uEKANP9UgigWF" alt="Training in progress: Training Model at the Latent Confounder Modeling stage, 2 of 5 stages done, with the full stage list and progress bars below"><figcaption><p>Training progress. The stages run in sequence; each can take from seconds to several minutes depending on dataset size.</p></figcaption></figure>

| Stage                                      | What happens                                          |
| ------------------------------------------ | ----------------------------------------------------- |
| Preparing Data                             | Variables standardized, missing values handled        |
| Causal Discovery                           | Statistical tests identify cause-and-effect structure |
| Latent Confounder Modeling *(if enabled)*  | Hidden common causes detected and modeled             |
| Symbolic Equation Discovery *(if enabled)* | Equations fitted to quantify each relationship        |
| Building & Evaluating Model                | Final model assembled and quality metrics computed    |

Training time ranges from a few minutes for small datasets to longer for large ones. You can navigate away — training continues in the background, and the twin's page shows live stage progress until it finishes.

***

## Review the trained twin

When training completes, you land on the Digital Twin overview.

<figure><img src="/files/lWmrXR4b3B8sbRtL0AXH" alt="Digital Twin Home after training, showing the causal graph and cards for Configuration, Versions, Simulations, Graph explorer, and Model evaluation"><figcaption><p>The twin Home after training: Configuration (19 variables, 31 relationships), Versions (v1.0.0), Simulations, Graph explorer, and Model evaluation (69.6% model fit).</p></figcaption></figure>

The overview shows:

* **Configuration** — the twin type, variable count, and relationship count.
* **Versions** — each training run creates a new version. Previous versions are retained and can be compared or switched between.
* **Simulations** — run interventions, predictions, and the other simulation types against the trained model.
* **Graph explorer** — which variables influence which, and how many candidate relationships were tested and ruled out.
* **Model evaluation** — overall model fit. A score above 60% is generally good; lower scores may indicate missing variables or data quality issues worth investigating.

***

## Next step

Your Digital Twin is trained and ready. Now you can run simulations to ask what-if questions, find key drivers, and test interventions.

Next step: [Step 6: Run Simulations](/user-guide/simulations.md)
