API reference

andrey.Structure#

class andrey.Structure[source]#

Base class of the learned graphs, GraphStructure and TemporalStructure.

A method’s result holds one in StructureOutput.structure; Structure itself is abstract. The class attribute type is "graph" for a GraphStructure (including a SummaryGraph) and "temporal" for a TemporalStructure. Both have n_nodes and labels.

property n_nodes: int#

Number of nodes, including nodes without edges and any latent nodes the method adds.

property labels: tuple[str, ...] | None#

Node names (a DataFrame’s column names), or None when nodes are numbered from 0.

Each name is a str, unique among the nodes: a structure built with other names, such as the integers (1, 0, 2), holds them as text, ("1", "0", "2").