SciPy TutorialLesson 7Free preview
SciPy Graphs
This lesson is part of SciPy · All levels
Summary
The scipy.sparse.csgraph module provides algorithms to work with graphs represented as adjacency matrices, such as shortest_path, connected_components, and minimum_spanning_tree. Graphs often appear on networking, map, and entity-to-entity relationships issues. Matrix representations make graph algorithms computable by efficient numerical operations.
Key points
- The graph is stored as an adjacency matrix or adjacency list
- Shortest_path counts the shortest path between nodes
- Connected_components find components that are connected
- Minimum_spanning_tree forming a link tree at a minimum cost
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.