Graphs#

Graphs built from sequence databases and pattern sets.

Every builder returns a networkx.DiGraph (or Graph) whose node and edge attributes are plain scalars, so that it can be written to GraphML, GEXF, GML, JSON or Cytoscape without loss (see spmviz.io).

Extension network, confidence closure, prefix trees, transition graphs, lattices, higher-order networks, communities.

Functions#

confidence_matrix(ps[, weight])

Confidence adjacency \(\mathbf{A}\): \(a_{ij}\) is the weight of the extension \(\varphi_i\to\varphi_j\).

double_tree(db, anchor[, max_depth, min_count])

Predecessor and successor trees of a pivot pattern (word tree / double tree).

extension_network(ps[, weight, start_items, ...])

Weighted extension network of frequent sequences (NBVFS-WN).

higher_order_network(db[, max_order, ...])

Variable-order network of the sequences (BuildHON; Xu, Wickramarathne & Chawla, 2016).

item_graph(ps[, min_support])

Items as nodes, a → b weighted by the support of the 2-pattern ⟨a b⟩ (eventually-follows).

pattern_communities(ps[, similarity, knn, ...])

Groups of patterns that tend to occur in the same sequences (sub-processes).

pattern_lattice(ps)

Hasse diagram of the containment order: p → q when q has one item more and contains p.

prefix_tree(db[, max_depth, min_count, ...])

Trie of the sequences (the aggregation behind sunbursts, icicles, LifeFlow and word trees).

similarity_graph(ps[, similarity, ...])

Undirected graph of similar patterns (kNN and/or threshold on a similarity).

similarity_matrix(ps[, similarity])

A pattern similarity by name: "transaction" (Jaccard), "confidence" (closure), "content" (LCS), or a precomputed square array.

sublogs(ps, labels)

The sequences supporting the patterns of each group: one sub-database per community.

transition_graph(db[, min_count, start_end, ...])

Directly-follows graph (first-order transitions; process mining DFG, Markov chain).

transitive_confidence(A[, symmetric])

Max-product transitive closure \(\mathbf{A}^{*}\) (NBVFS-CM).

Constants#

START

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str