module documentation

Low-level Python interface for the igraph library. Should not be used directly.

Class EdgeSeq Low-level representation of an edge sequence.
Class VertexSeq Low-level representation of a vertex sequence.
Function umap_compute_weights Compute undirected UMAP weights from directed distance graph. UMAP is a layout algorithm that usually takes as input a directed distance graph, for instance a k nearest neighbor graph based on Euclidean distance between points in a vector space...
Function _compare_communities Undocumented
Function _disjoint_union Undocumented
Function _enter_safelocale Helper function for the safe_locale() context manager. Do not use directly in your own code.
Function _exit_safelocale Helper function for the safe_locale() context manager. Do not use directly in your own code.
Function _intersection Undocumented
Function _power_law_fit Undocumented
Function _split_join_distance Undocumented
Function _union Undocumented
def umap_compute_weights(graph, dist):

Compute undirected UMAP weights from directed distance graph. UMAP is a layout algorithm that usually takes as input a directed distance graph, for instance a k nearest neighbor graph based on Euclidean distance between points in a vector space. The graph is directed because vertex v1 might consider vertex v2 a close neighbor, but v2 itself might have many neighbors that are closer than v1. This function computes the symmetrized weights from the distance graph using union as the symmetry operator. In simple terms, if either vertex considers the other a close neighbor, they will be treated as close neighbors.

This function can be used as a separate preprocessing step to Graph.layout_umap(). For efficiency reasons, the returned weights have the same length as the input distances, however because of the symmetryzation some information is lost. Therefore, the weight of one of the edges is set to zero whenever edges in opposite directions are found in the input distance graph. You can pipe the output of this function directly into Graph.layout_umap() as follows: weights = igraph.umap_compute_weights(graph, dist) layout = graph.layout_umap(weights=weights)

Parameters
graphdirected graph to compute weights for.
distdistances associated with the graph edges.
Returns
Symmetrized weights associated with each edge. If the distance graph has both directed edges between a pair of vertices, one of the returned weights will be set to zero.
See Also
Graph.layout_umap()
def _compare_communities(comm1, comm2, method='vi'):

Undocumented

def _disjoint_union(graphs):

Undocumented

def _enter_safelocale():

Helper function for the safe_locale() context manager. Do not use directly in your own code.

def _exit_safelocale(locale):

Helper function for the safe_locale() context manager. Do not use directly in your own code.

def _intersection(graphs, edgemaps):

Undocumented

def _power_law_fit(data, xmin=-1, force_continuous=False, p_precision=0.01):

Undocumented

def _split_join_distance(comm1, comm2):

Undocumented

def _union(graphs, edgemaps):

Undocumented