Datasets:
Tasks:
Graph Machine Learning
Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
ArXiv:
Tags:
hypergraph
File size: 2,977 Bytes
473993c c5075f4 473993c c5075f4 473993c 1ffaa73 312de30 2660085 cf93347 7f3f4f7 a46294c 23c9376 ea3f6a5 daf7e46 c45cc2f 23c9376 ea3f6a5 a46294c 23c9376 ea3f6a5 a46294c 7f3f4f7 3a02c0b 89a16c5 b5d8997 3a02c0b 4bca931 7f3f4f7 3a02c0b 1ffaa73 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | ---
language:
- en
tags:
- hypergraph
task_categories:
- graph-ml
---
# NDC-classes
[Zenodo](https://zenodo.org/records/10155772) | [Cornell](https://www.cs.cornell.edu/~arb/data/NDC-classes/) | [Source Paper](https://arxiv.org/abs/1802.06916)
NDC-classes is an undirected hypergraph built from the U.S. FDA’s National Drug Code (NDC) Directory, designed for higher-order network / hypergraph machine learning in the drug domain. Each hyperedge corresponds to a drug and connects the set of pharmacologic/therapeutic class labels assigned to that drug, while nodes represent the class labels themselves (e.g., “serotonin reuptake inhibitor”), capturing co-classification patterns as higher-order interactions rather than pairwise links.
## Usage
```python
dataset = load_dataset("daqh/NDC-classes", split="full")
hypergraphs = [xgi.from_hif_dict(d, nodetype=int, edgetype=int) for d in dataset]
```
## Statistics
<div align="center">
<table>
<tbody>
<tr>
<td colspan="2" align="center">
<figure>
<img src="assets/hypergraph.png">
</figure>
</td>
</tr>
<tr>
<td align="center">
<figure>
<img src="assets/node-degree-distribution.png">
</figure>
</td>
<td align="center">
<figure>
<img src="assets/hyperedge-size-distribution.png">
</figure>
</td>
</tr>
</tbody>
</table>
</div>
## Content
The hypergraph is stored in HIF (Hypergraph Interchange Format) as a JSON object, following the schema used to exchange higher-order network data across tools. Concretely, the dataset provides the canonical HIF fields-network-type, metadata, nodes, edges, and incidences-so you can reconstruct the full incidence structure without additional processing.
In addition to the raw hypergraph topology, vector features are provided for both nodes and hyperedges (in their attribute dictionaries), enabling out-of-the-box experimentation with representation learning and downstream tasks:
- Spectral features: eigenvectors of the (hypergraph) Laplacian (computed via sparse eigensolvers).
- [Node2Vec](https://arxiv.org/abs/1607.00653) embeddings: random-walk–based structural embeddings.
- [VilLain](https://dl.acm.org/doi/10.1145/3589334.3645454) embeddings: self-supervised hypergraph representation learning via virtual label propagation.
Basic statistics (as packaged here): 1161 nodes, 1088 hyperedges, 183 connected component, largest connected component ratio is 0.540913006029285.
## Citation
```
@article{Benson-2018-simplicial,
author = {Benson, Austin R. and Abebe, Rediet and Schaub, Michael T. and Jadbabaie, Ali and Kleinberg, Jon},
title = {Simplicial closure and higher-order link prediction},
year = {2018},
doi = {10.1073/pnas.1800683115},
publisher = {National Academy of Sciences},
issn = {0027-8424},
journal = {Proceedings of the National Academy of Sciences}
}
``` |