Node degree
Node degree is the number of edges or relationships directly incident to a node, with direction, self-loops, and structural conventions determining how connections are counted.
Knowledge Graphs and LLMs in Action
Node degree is the number of edges incident to a node, optionally separated by incoming and outgoing direction.
- How it is used
- Uses direct connectivity as a baseline feature for node classification, fraud detection, and degree-weighted path analysis.
- How deep it goes
- Defines neighbor counting and demonstrates code, but stops short of treating degree as a sufficient representation for complex structure.
- Examples
- Demonstrates karate-club classification, fraud and legitimate neighbor counts, and metformin–disease path weighting.
- What you can do after
- Apply it via NetworkX and Neo4j to construct connectivity features and reduce hub-driven noise in graph-based analyses.
Read how Knowledge Graphs and LLMs in Action explains node degree →
Graph Neural Networks in Action
The degree of a node is the number of graph edges incident to it, subject to conventions such as self-loop counting.
- How it is used
- Uses node degree to assess graph connectivity, inspect distributions, select components, and identify nodes that may dominate aggregation.
- How deep it goes
- Defines degree and develops counting, ranking, histogramming, and normalization implications without deriving the full GCN equations.
- Examples
- Demonstrates degree distributions with Amazon Electronics and social graphs using sparse tensors, NumPy, NetworkX, rank plots, and histograms.
- What you can do after
- Diagnose graph connectivity and degree imbalance with Python, NumPy, PyTorch, and NetworkX statistics and visualizations.
Read how Graph Neural Networks in Action explains node degree →
Graph Algorithms for Data Science
Node degree is the number of graph relationships incident to a node, with directed graphs potentially distinguishing incoming and outgoing relationships.
- How it is used
- Characterizes network structure by counting each node’s incident links and comparing the resulting degree distribution.
- How deep it goes
- Defines degree and distinguishes directed in-degree from out-degree, but does not develop a calculation procedure or implementation.
- Examples
- Uses handshakes, web pages, and URL links to illustrate links, directed degree, and contrasting degree distributions.
- What you can do after
- Evaluate network structure by identifying typical connectivity, low-degree nodes, and highly connected nodes.
Read how Graph Algorithms for Data Science explains node degree →
Fabulous Adventures in Data Structures and Algorithms
Graph degree is the number of edges incident to a given graph node.
- How it is used
- Guides node selection in recursive graph-coloring search.
- How deep it goes
- Defines degree and works through low- and high-degree cases, then applies it in recursive coloring code.
- Examples
- Uses Falkland Islands, Colombia, and the South America graph as degree examples.
- What you can do after
- Apply it via a recursive coloring algorithm that removes low-degree nodes before restoring them.
Read how Fabulous Adventures in Data Structures and Algorithms explains node degree →
Related concepts
- Adamic-Adar indexused by · The Adamic-Adar index is a link-prediction metric that scores node pairs by weighting common neighbors more highly when they have lower degree.
- common neighbor countmeasured by · Common neighbor count is the number of nodes directly connected to both members of a node pair, often used as a link-prediction score.
- degree-weighted path countused by · A degree-weighted path count is a path-based graph metric that weights paths according to the degrees of the entities they traverse.
- PageRankcontrasts with · PageRank is a link-analysis algorithm that estimates the relative importance of nodes in a directed graph from the structure and importance of incoming links.
- undirected graphcontrasts with · An undirected graph is a graph whose edges have no orientation, so each edge connects its endpoints symmetrically.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



