Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorMark Needham, Amy E. Hodler

Learn how graph algorithms can help you leverage relationships within your data to develop intelligent solutions and enhance your machine learning models. With this practical guide,developers and data scientists will discover how graph analytics deliver value, whether they’re used for building dynamic network models or forecasting real-world behavior. Mark Needham and Amy Hodler from Neo4j explain how graph algorithms describe complex structures and reveal difficult-to-find patterns—from finding vulnerabilities and bottlenecksto detecting communities and improving machine learning predictions. You’ll walk through hands-on examples that show you how to use graph algorithms in Apache Spark and Neo4j, two of the most common choices for graph analytics. Learn how graph analytics reveal more predictive elements in today’s data Understand how popular graph algorithms work and how they’re applied Use sample code and tips from more than 20 graph algorithm examples Learn which algorithms to use for different types of questions Explore examples with working code and sample datasets for Spark and Neo4j Create an ML workflow for link prediction by combining Neo4j and Spark

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on field guide to graph analytics that teaches you which algorithm answers which question, and how to run it in Apache Spark or Neo4j. Best for developers and data scientists who already work with data pipelines and want to turn relationships into predictive features. 【Book Arc】 - **Opening (~0%–10%)**: Frames why relationships matter in connected data, defines graphs and graph analytics, and contrasts graph processing engines with graph databases so you know what each tool is for. - **Early (~10%–25%)**: Builds the vocabulary and mental model—terminology, graph types and structures (random, small-world, scale-free), directed vs. undirected, weighted, cyclic, sparse/dense, and bipartite graphs—plus platform selection criteria for Spark vs. Neo4j. - **Early–Middle (~25%–50%)**: Covers traversal and pathfinding: Breadth First Search, Depth First Search, Shortest Path with A* and Yen's variations, All Pairs and Single Source Shortest Path, Minimum Spanning Tree, and Random Walk, with parallel Spark and Neo4j examples. - **Middle (~50%–75%)**: Moves into centrality and importance scoring—identifying influential nodes, bottlenecks, and vulnerabilities in networks—showing how different centrality measures answer different "who matters?" questions. - **Late (~75%–90%)**: Explores community detection and graph structure at a higher level, revealing how groups form, merge, or break apart, and how those clusters support recommendations and anomaly detection. - **Ending (~90%–100%)**: Ties algorithms into machine learning workflows, including link prediction that combines Neo4j and Spark, and closes with guidance on choosing algorithms for real problems. 【Key Takeaways】 - **Graph analytics answers relationship-shaped questions** (Opening): routing, vulnerability, influence, missing links, communities, and fraud reduction are all framed as graph problems before any code appears. - **Structure determines behavior** (Early): random, small-world, and scale-free networks produce very different patterns; recognizing which structure you have guides algorithm choice. - **Directedness and cycles change results** (Early): running an algorithm on a directed vs. undirected graph, or on a cyclic vs. acyclic graph, yields materially different answers—so model direction deliberately. - **Search and pathfinding are the foundation** (Early–Middle): BFS and DFS underpin traversal, while Shortest Path, A*, Yen's, All Pairs, Single Source, Minimum Spanning Tree, and Random Walk solve concrete routing and cost problems. - **Heuristics must not overestimate** (Middle): in A*, underestimating path cost keeps results accurate; overestimating can skip genuinely shorter paths and produce wrong answers. - **Random Walk is a building block, not an endpoint** (Middle): it feeds node embeddings (node2vec, graph2vec), community detection (Walktrap, Infomap), and ML training pipelines. - **Centrality reveals power and fragility** (Middle): the same network can be read for influence, bottlenecks, or attack vulnerability depending on which measure you apply. - **Algorithms become ML features** (Late–Ending): the book's throughline is extracting predictive graph features and building a link-prediction workflow across Neo4j and Spark. 【Reading Tips】 - Deep-read the early theory chapters even if you're impatient—terminology like bipartite, DAG, and scale-free recurs constantly and skipping it makes later algorithm choices feel arbitrary. - Skim the duplicated Spark/Neo4j code listings for whichever platform you don't use; read the prose around them, since it explains parameters and trade-offs. - Treat the algorithm-selection framing as the real deliverable: for each chapter, note which question type it answers rather than memorizing syntax. - Pay extra attention to the A* heuristic warning and the Random Walk use cases—these are the spots where naive implementation causes silent errors. - Keep the transport dataset example in mind as a reusable sandbox; it's the thread that connects pathfinding chapters. 【Coverage Limits】 This guide is synthesized from stratified excerpts covering the preface, table of contents, early theory, and pathfinding/random walk material; later centrality, community detection, and ML workflow chapters are represented only by their stated themes, so specific algorithms, metrics, and code in those sections are not detailed here.
Page 5
. . . . . . . . . . . . . . . . . . . . 1 What Are Graphs? 2 What Are Graph Analytics and Algorithms? 3 Graph Processing, Databases, Queries, and Algorithms...
View in text
Excerpt 2
s with distinctive structures, distributions, and behaviors. As we work with graph algorithms, we’ll come to recognize similar pat‐ terns in our results. Fla...
View in text
Excerpt 3
-relationships.csv", header=True) reversed_rels = (rels.withColumn("newSrc", rels.dst) .withColumn("newDst", rels.src) .drop("dst", "src") .withColumnRenamed...
View in text
Excerpt 4
road trip between those areas. Single Source Shortest Path The Single Source Shortest Path (SSSP) algorithm, which came into prominence at around the same ti...
View in text
Excerpt 5
e the original problem with unconnected graphs. In “Harmony in a Small World”, M. Marchiori and V. Latora proposed this concept as a practical representation...
View in text
Excerpt 6
tection Algorithms Strongly Connected Components with Neo4j Let’s run the same algorithm using Neo4j. Execute the following query to run the algorithm: CALL...
View in text
Excerpt 7
60049 13 51 6572 J 11.431505999999997 103 1322 6498 Abby 11.376136999999998 9 82 7922 Erica 10.993773 6 15 7071 Randy 10.748785999999999 21 125 7846 These re...
View in text
Excerpt 8
uped by the destination airport: delayed_flights = (g.edges .filter("src = 'ORD' and deptDelay > 0") .groupBy("dst") .agg(F.avg("deptDelay"), F.count("deptDe...
View in text
Tags
AI categories
GoDataBig Data
algorithm
ISBN: 1492047686
Publisher: O’Reilly Media
Publish Year: 2019
Language: English
Pages: 256
File Format: PDF
File Size: 10.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…