For the complete documentation index, see llms.txt. This page is also available as Markdown.

Graph

Discovered causal graphs, and the domain knowledge pinned onto them.

Graph

The causal graph of a twin version: edges, adjacency, and domain-knowledge pins.

Properties

  • nodes (list[str])

  • edges (pd.DataFrame)

Graph.refresh

Graph.refresh() -> Graph

Undocumented; the signature above is the contract.

Graph.link() -> Any

The twin page this graph is drawn on, as a clickable URL.

Graph.adjacency

Graph.adjacency(values: str = 'strength') -> pd.DataFrame

Adjacency matrix as a labelled DataFrame.

Parameter
Type
Default
Description

values

str

'strength'

What each cell holds: strength, sign, or bool.

Returns (pd.DataFrame): A square DataFrame indexed by cause and labelled by effect.

Graph.to_numpy

Undocumented; the signature above is the contract.

Graph.to_networkx

Undocumented; the signature above is the contract.

Graph.pin

Fix an edge as present: domain knowledge the next discovery run must honour.

Parameter
Type
Default
Description

cause

str

required

The causing variable.

effect

str

required

The affected variable.

Returns (Graph): This graph, refreshed.

Graph.forbid

Fix an edge as absent (anti-edge).

Parameter
Type
Default
Description

cause

str

required

The causing variable.

effect

str

required

The affected variable.

Returns (Graph): This graph, refreshed.

Graph.train

Undocumented; the signature above is the contract.

Last updated