Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -14,67 +14,6 @@ tags:
|
|
| 14 |
- stochastic-block-model
|
| 15 |
- complete-graph
|
| 16 |
- graph-qa
|
| 17 |
-
dataset_info:
|
| 18 |
-
features:
|
| 19 |
-
- name: algorithm
|
| 20 |
-
dtype: string
|
| 21 |
-
- name: edge_list
|
| 22 |
-
dtype: string
|
| 23 |
-
- name: node_count
|
| 24 |
-
dtype: int64
|
| 25 |
-
- name: edge_count
|
| 26 |
-
dtype: int64
|
| 27 |
-
- name: node_degree_node
|
| 28 |
-
dtype: int64
|
| 29 |
-
- name: node_degree
|
| 30 |
-
dtype: int64
|
| 31 |
-
- name: edge_existence_src
|
| 32 |
-
dtype: int64
|
| 33 |
-
- name: edge_existence_dst
|
| 34 |
-
dtype: int64
|
| 35 |
-
- name: edge_existence
|
| 36 |
-
dtype: bool
|
| 37 |
-
- name: cycle_check
|
| 38 |
-
dtype: bool
|
| 39 |
-
- name: triangle_count
|
| 40 |
-
dtype: int64
|
| 41 |
-
- name: connected_nodes_node
|
| 42 |
-
dtype: int64
|
| 43 |
-
- name: connected_nodes
|
| 44 |
-
dtype: string
|
| 45 |
-
- name: reachability_src
|
| 46 |
-
dtype: int64
|
| 47 |
-
- name: reachability_dst
|
| 48 |
-
dtype: int64
|
| 49 |
-
- name: reachability
|
| 50 |
-
dtype: bool
|
| 51 |
-
- name: shortest_path_src
|
| 52 |
-
dtype: int64
|
| 53 |
-
- name: shortest_path_dst
|
| 54 |
-
dtype: int64
|
| 55 |
-
- name: shortest_path
|
| 56 |
-
dtype: int64
|
| 57 |
-
splits:
|
| 58 |
-
- name: train
|
| 59 |
-
num_bytes: 6331306
|
| 60 |
-
num_examples: 10000
|
| 61 |
-
- name: validation
|
| 62 |
-
num_bytes: 648652
|
| 63 |
-
num_examples: 1000
|
| 64 |
-
- name: test
|
| 65 |
-
num_bytes: 637077
|
| 66 |
-
num_examples: 1000
|
| 67 |
-
download_size: 1545715
|
| 68 |
-
dataset_size: 7617035
|
| 69 |
-
configs:
|
| 70 |
-
- config_name: default
|
| 71 |
-
data_files:
|
| 72 |
-
- split: train
|
| 73 |
-
path: data/train-*
|
| 74 |
-
- split: validation
|
| 75 |
-
path: data/validation-*
|
| 76 |
-
- split: test
|
| 77 |
-
path: data/test-*
|
| 78 |
---
|
| 79 |
|
| 80 |
# Graph Dataset with Task Labels
|
|
@@ -98,7 +37,7 @@ This dataset contains synthetic graphs represented as edge lists, along with gro
|
|
| 98 |
| Field | Type | Description |
|
| 99 |
|-------|------|-------------|
|
| 100 |
| `algorithm` | string | Graph generation algorithm: `erdos_renyi`, `barabasi_albert`, `watts_strogatz`, `stochastic_block_model`, or `complete` |
|
| 101 |
-
| `edge_list` | string | Edge list in format `(u, v), (x, y),
|
| 102 |
|
| 103 |
#### Task Columns
|
| 104 |
|
|
@@ -160,10 +99,9 @@ import ast
|
|
| 160 |
|
| 161 |
def parse_edge_list(edge_list_str):
|
| 162 |
"""Parse edge list string to list of tuples."""
|
| 163 |
-
if not edge_list_str:
|
| 164 |
return []
|
| 165 |
-
|
| 166 |
-
return ast.literal_eval(edges_str)
|
| 167 |
|
| 168 |
sample = dataset["train"][0]
|
| 169 |
edges = parse_edge_list(sample["edge_list"])
|
|
|
|
| 14 |
- stochastic-block-model
|
| 15 |
- complete-graph
|
| 16 |
- graph-qa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
# Graph Dataset with Task Labels
|
|
|
|
| 37 |
| Field | Type | Description |
|
| 38 |
|-------|------|-------------|
|
| 39 |
| `algorithm` | string | Graph generation algorithm: `erdos_renyi`, `barabasi_albert`, `watts_strogatz`, `stochastic_block_model`, or `complete` |
|
| 40 |
+
| `edge_list` | string | Edge list in format `[(u, v), (x, y), ...]` |
|
| 41 |
|
| 42 |
#### Task Columns
|
| 43 |
|
|
|
|
| 99 |
|
| 100 |
def parse_edge_list(edge_list_str):
|
| 101 |
"""Parse edge list string to list of tuples."""
|
| 102 |
+
if not edge_list_str or edge_list_str == "[]":
|
| 103 |
return []
|
| 104 |
+
return ast.literal_eval(edge_list_str)
|
|
|
|
| 105 |
|
| 106 |
sample = dataset["train"][0]
|
| 107 |
edges = parse_edge_list(sample["edge_list"])
|