AI Advances

Democratizing access to artificial intelligence

Follow publication

Member-only story

Graph ML: Graph traversal algorithms in a nutshell

A quick glance at bread-first and depth-first search algorithms for graph machine learning

Salvatore Raieli
AI Advances
Published in
9 min readJun 4, 2024

--

Graph traversal algorithms
photo by Susan Q Yin at Unsplash

Any time you’re in a maze there’s multiple ways to get to the end. — Martellus Bennett

I have a theory that when you’re lost on the path, go back to the beginning and try the maze again. — Amanda Seales

BFS and DFS are the basis of many graph machine learning algorithms (graph embedding techniques such as Node2vec, Graph Neural Network, and so on). Thus here I am providing a quick but complete introduction to what they are how they work and Python implementation. In this article, I am focusing only on the information that is relevant to graph machine learning and a good knowledge of how the algorithms work (without divagating in all the details of the algorithm and data structure course).

Content of this article:

  • A gentle introduction to graph traversal algorithm
  • How to implement them on Python
  • Advantages and disadvantages of the different…

--

--

Written by Salvatore Raieli

Senior data scientist | about science, machine learning, and AI. Top writer in Artificial Intelligence

Responses (2)

Write a response