COO format
COO format is a sparse data representation that stores each nonzero entry with its coordinate indices and value.
Build AI Drug Discovery Pipelines
COO format is a sparse matrix representation that stores the coordinates of nonzero entries.
- How it is used
- Encodes molecular-graph connectivity for drug–target affinity prediction.
- How deep it goes
- Defines the 2×num_edges layout, explains sparse-memory advantages, and stops short of lower-level kernel implementation.
- Examples
- Uses a 20-atom molecule with 78 features per atom and 25 bidirectional bonds plus self-loops.
- What you can do after
- Apply it via PyTorch Geometric by constructing edge_index tensors inside Data objects.
Read how Build AI Drug Discovery Pipelines explains COO format →
Graph Neural Networks in Action
COO format represents sparse data as collections of coordinates and corresponding values for nonzero entries.
- How it is used
- Represents sparse graph adjacency data efficiently for learning and inference at scale.
- How deep it goes
- Defines stored coordinates and values, compares memory and computation, and names PyG conversion paths without detailing COO internals.
- Examples
- Uses dense adjacency conversion and a ToSparseTensor dataset transform as implementation examples.
- What you can do after
- Apply via PyTorch Geometric's ToSparseTensor or manual PyTorch and SciPy conversions.
Read how Graph Neural Networks in Action explains COO format →
Related concepts
- edge indexincludes · An edge index is a tensor-based representation that records graph edges as pairs of source and destination node indices.
- sparse representationused by · A sparse representation stores nondefault or present values and the information needed to locate them, omitting or compressing default or absent values.
Questions about COO format
What is COO format?
COO format is a sparse data representation that stores each nonzero entry with its coordinate indices and value.
Which Manning books explain COO format?
Build AI Drug Discovery Pipelines and Graph Neural Networks in Action.
What kinds of COO format are there?
Kinds of COO format include edge index.
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.

