graphclust.graphs.geodesic_distances#

graphclust.graphs.geodesic_distances(graph, *, points=None, connect=False)[source]#

All-pairs shortest-path (graph, geodesic) distances with Dijkstra’s algorithm.

Parameters:
graphsparse matrix of shape (n, n)

Weighted symmetric graph, e.g. from knn_graph() or the adjacency_ of a topology learner.

pointsarray of shape (n, n_features), optional

Coordinates of the nodes; needed when connect=True.

connectbool, default=False

Join the components first with connect_components() so that all distances are finite.

Examples using graphclust.graphs.geodesic_distances#

Geodesic distances on a neighborhood graph

Geodesic distances on a neighborhood graph

Combining quantization, distance and mapping

Combining quantization, distance and mapping

Quantitative comparison of topology-based maps

Quantitative comparison of topology-based maps

Mapping real data: Wine and Wisconsin breast cancer

Mapping real data: Wine and Wisconsin breast cancer