What Is a DAG?

Learn about DAGs and how they relate to the ML pipeline.

Introduction to DAGs

In graph theory, a directed acyclic graph (DAG) is a set of vertices or nodes connected by edges so that:

  • Every edge is unidirectional.

  • There are no loops in the graph if we follow the edge directions.

This will become clear after we see a few examples.

Press + to interact
A simple directed graph
A simple directed graph

The above figure shows a simple graph. This is a directed graph because if we start at vertex a and follow the edge connected to it, we end up at b. If we start at vertex b, we can’t go to any other node because the only connected edge is directed toward it.

Press + to interact
A directed graph with a loop
A directed graph with a loop

The figure above shows a graph with three vertices, a, b, and c. This is ...