Dataset Viewer
data_id
stringlengths 13
13
| graph_id
stringclasses 90
values | X
listlengths 1k
1k
| y
listlengths 1k
1k
| adjacency_matrix
listlengths 10
20
| feature_mask
listlengths 9
19
| fs_method
stringclasses 1
value | num_nodes
int64 10
20
| num_edges
int64 9
99
| density
float64 0.1
0.27
| graph_generation_method
stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
data_739860d0
|
graph_cf8003b2
| [[1.3027918339,-0.9930894375,-1.2430223227,-0.4364097416,-0.1438138783,-0.5392002463,-0.3721244037,-(...TRUNCATED)
| [0.2037354261,-0.088533178,0.3345715702,-0.8660823107,0.6359411478,0.691467464,0.0879743695,0.425744(...TRUNCATED)
| [[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],[1,0,1,0,0,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1,(...TRUNCATED)
|
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1
] |
markov_blanket
| 15
| 50
| 0.238095
|
PA
|
data_97e5c859
|
graph_c72bd029
| [[-1.0129599571,-1.0269979239,-0.7029289603,-1.5453480482,0.2802293301,0.1455386579,-0.0609239303,-0(...TRUNCATED)
| [-0.6666510105,0.5385491848,2.960470438,-1.5420469046,0.0749411508,1.1230297089,-1.2032879591,-1.592(...TRUNCATED)
| [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1],[1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,1,0,0,0,(...TRUNCATED)
|
[
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
1,
0,
0,
1,
1,
0,
1,
0
] |
markov_blanket
| 20
| 54
| 0.142105
|
PA
|
data_14657394
|
graph_eb35c7a7
| [[-0.436049968,0.5885413289,-0.0977099538,-0.3959354758,0.9837520719,-1.0069482327,0.2546019852,-1.2(...TRUNCATED)
| [1.2935563326,0.2879134119,1.697532773,0.5130543113,-1.126868844,-1.4219717979,1.119183898,0.8702120(...TRUNCATED)
| [[0,0,0,0,0,1,1,0,0,1],[1,0,1,1,1,1,1,0,0,0],[1,0,0,0,0,0,0,0,1,0],[1,0,1,0,1,0,1,1,0,1],[1,0,0,0,0,(...TRUNCATED)
|
[
1,
0,
1,
1,
1,
1,
0,
0,
1
] |
markov_blanket
| 10
| 24
| 0.266667
|
PA
|
data_c1312efe
|
graph_34874138
| [[-1.3080459833,0.427819103,-0.5036221743,0.6776651144,0.6844693422,-1.5012862682,0.854534328,0.4888(...TRUNCATED)
| [-0.1622830927,0.4073456228,-0.1642546952,0.1109250784,0.1188505888,-0.1774655432,1.1006233692,-0.07(...TRUNCATED)
| [[0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],[1,0,1,1,0,0,1,0,0,0,1,0,0,1,0],[1,0,0,1,0,1,0,0,0,0,0,0,1,0,0],[0,(...TRUNCATED)
|
[
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
0,
0
] |
markov_blanket
| 15
| 27
| 0.128571
|
PA
|
data_4bd49b1f
|
graph_99db93a0
| [[-0.1761981696,-0.229920879,0.0437544473,-0.6407193542,-0.3876416981,-0.7357248664,0.2500348985,0.4(...TRUNCATED)
| [0.2041431218,-1.0945820808,-1.5093488693,-0.6317516565,-0.6319238544,0.1453442425,0.0209808312,-0.0(...TRUNCATED)
| [[0,1,1,1,1,1,0,1,0,1],[0,0,1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1],[0,0,1,0,1,1,0,0,0,0],[0,0,0,0,0,(...TRUNCATED)
|
[
1,
0,
1,
0,
0,
0,
0,
0,
0
] |
markov_blanket
| 10
| 17
| 0.188889
|
PA
|
data_0d49c231
|
graph_b8d62a91
| [[-0.3437875211,-0.0807330981,-0.0828980282,-0.1016202196,-0.0538506135,0.3102817237,0.1775397658,0.(...TRUNCATED)
| [0.0689825267,-0.2743956745,0.5067677498,0.2401835024,0.7453879118,0.6622304916,0.4223511219,-0.1627(...TRUNCATED)
| [[0,1,1,1,1,0,0,0,0,1],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,(...TRUNCATED)
|
[
1,
0,
0,
0,
0,
0,
0,
0,
1
] |
markov_blanket
| 10
| 9
| 0.1
|
PA
|
data_79017073
|
graph_fb056bd0
| [[1.3181693554,0.2618122101,-0.2195801735,0.8404861689,0.0998797044,0.1650153995,-0.2246652395,-1.60(...TRUNCATED)
| [0.4219196439,-0.1108386517,0.9344680309,0.3546136022,0.9730243683,0.4291289747,0.7306182384,0.37878(...TRUNCATED)
| [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1,0,1,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0,0,0],[1,0,0,1,0,0,0,(...TRUNCATED)
|
[
0,
1,
0,
0,
1,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0
] |
markov_blanket
| 20
| 54
| 0.142105
|
PA
|
data_c7e0e9a5
|
graph_3ad5e6ab
| [[-0.5500288606,0.61768049,0.2937857807,-0.2859630287,0.5906274319,0.5075570345,0.4165365696,-0.8845(...TRUNCATED)
| [-0.5761443973,-0.1249776259,0.4333809912,0.5077933669,-0.8599262834,-0.3741809428,-0.6928575635,-0.(...TRUNCATED)
| [[0,0,0,1,0,0,0,0,0,0,0,0,1,0,0],[1,0,0,0,0,0,0,0,0,0,0,0,1,0,0],[0,1,0,0,0,0,0,0,0,0,0,0,0,0,1],[0,(...TRUNCATED)
|
[
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0
] |
markov_blanket
| 15
| 27
| 0.128571
|
PA
|
data_75832886
|
graph_daead216
| [[0.9958511591,-0.1813665032,-0.1424863189,-0.2659813166,2.6287889481,-0.3229358792,0.9306092858,0.6(...TRUNCATED)
| [-0.44439888,-0.2062304169,0.0643578321,-0.261095345,0.2474688143,0.1972398907,-0.1459038109,0.65380(...TRUNCATED)
| [[0,1,1,1,1,1,1,0,1,0,1,0,0,1,0,1,0,0,0,0],[0,0,1,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0],[0,0,0,0,1,1,0,(...TRUNCATED)
|
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
markov_blanket
| 20
| 99
| 0.260526
|
PA
|
data_ded1f793
|
graph_962ecb43
| [[-1.1937929392,-0.5791959167,-0.4211282134,0.5233409405,0.5401167274,-0.2464552373,-1.0116710663,-0(...TRUNCATED)
| [-1.0286774635,-0.1546670347,0.7700788975,0.2790464759,-0.7135148644,-0.9106477499,-0.7531294823,0.2(...TRUNCATED)
| [[0,0,1,1,0,0,0,1,0,0,0,0,0,1,0],[1,0,1,1,1,0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,0,1,0,0,1,0,0,0,0,0],[0,(...TRUNCATED)
|
[
1,
1,
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0
] |
markov_blanket
| 15
| 27
| 0.128571
|
PA
|
End of preview. Expand
in Data Studio
Phase 1 Dataset
Data Card
| Field | Type | Description |
|---|---|---|
data_id |
string | Unique identifier (hash of graph_id + target + scm_type) |
graph_id |
string | Source graph identifier |
X |
List[List[float]] | Feature matrix (n_samples × n_features) |
y |
List[float] | Target variable values (n_samples,) |
adjacency_matrix |
List[List[int]] | NxN binary matrix where N = (n_feature + 1), A[i,j]=1 means i→j (target as last node) |
feature_mask |
List[int] | Binary mask for Markov blanket features (n_features,) |
fs_method |
string | method used to generate feature_mask |
num_nodes |
int | Number of variables in original graph |
num_edges |
int | Number of edges in DAG |
density |
float | Actual density (edges / max_possible_edges) |
graph_generation_method |
string | Graph generation method (e.g., "PA", "ER") |
Dataset Generation Settings
- Graphs: See Graph Dataset
- Target Selection: Random node selection
- Data Generation: Linear or Nonlinear Gaussian SCM
- Linear: $X_i = \sum_j(\beta_{ij} \cdot X_j) + \epsilon_i$
- Nonlinear: $X_i = f(\sum_j(\beta_{ij} \cdot X_j)) + \epsilon_i$
- Coefficients $\beta_{ij}$ sampled from [-2, 2]
- Nonlinear functions: $x^2$, $\sin(x)$, $\cos(x)$, $\tanh(x)$, $x|x|$, $e^{-x^2}$
- Gaussian noise: $\epsilon_i \sim N(0, 0.5^2)$
Quick Start
Load Dataset
from datasets import load_dataset
import numpy as np
# Load dataset
linear_dataset = load_dataset("CSE472-blanket-challenge/phase1-dataset", split="train") # linear by default
nonlinear_dataset = load_dataset("CSE472-blanket-challenge/phase1-dataset", name="nonlinear", split="train")
record = linear_dataset[0]
print(f"X shape: {len(record['X'])} x {len(record['X'][0])}") # n_samples x n_features
print(f"y shape: {len(record['y'])}") # n_samples
print(f"Nodes: {record['num_nodes']}")
print(f"Graph density: {record['density']}")
Convert Adjacency Matrix to Graph
import networkx as nx
import numpy as np
# Get reordered adjacency matrix (target as last node)
adj_matrix = np.asarray(record["adjacency_matrix"])
# Create directed graph
dag = nx.from_numpy_array(adj_matrix, create_using=nx.DiGraph)
print(f"Nodes: {dag.number_of_nodes()}")
print(f"Edges: {dag.number_of_edges()}")
print(f"Is DAG: {nx.is_directed_acyclic_graph(dag)}")
Extract Features and Markov Blanket
# Get feature matrix and target
X = np.asarray(record["X"]) # (n_samples, n_features)
y = np.asarray(record["y"]) # (n_samples,)
# Get Markov blanket indices for features
mb_mask = np.asarray(record["markov_blanket"])
mb_indices = np.where(mb_mask == 1)[0]
print(f"Feature matrix shape: {X.shape}")
print(f"Target vector shape: {y.shape}")
print(f"Markov blanket features: {mb_indices}")
print(f"Total features in MB: {mb_mask.sum()}/{len(mb_mask)}")
- Downloads last month
- 147