Dataset Viewer
Auto-converted to Parquet
parcellation
stringclasses
5 values
subject
stringclasses
1 value
correlation_matrix
listlengths
8
8
corr_path
stringclasses
5 values
ts_path
stringclasses
5 values
corr_shape
listlengths
2
2
ts_shape
listlengths
1
1
corr_sha256
stringclasses
5 values
corr_bytes
int64
18.6k
108k
ts_sha256
stringclasses
5 values
ts_bytes
int64
80.8k
195k
AAL116
sub-control3351
[ [ 1, 0.11999999731779099, -0.05000000074505806, 0.07999999821186066, 0.019999999552965164, -0.10999999940395355, 0.029999999329447746, 0.09000000357627869 ], [ 0.11999999731779099, 1, 0.07000000029802322, -0.019999999552965164, 0.05000000074505806, 0.009999999776482582, -0.03999999910593033, 0.05999999865889549 ], [ -0.05000000074505806, 0.07000000029802322, 1, 0.14000000059604645, -0.029999999329447746, 0.019999999552965164, 0.05000000074505806, -0.009999999776482582 ], [ 0.07999999821186066, -0.019999999552965164, 0.14000000059604645, 1, 0.09000000357627869, -0.05999999865889549, 0, 0.03999999910593033 ], [ 0.019999999552965164, 0.05000000074505806, -0.029999999329447746, 0.09000000357627869, 1, 0.11999999731779099, -0.019999999552965164, 0.009999999776482582 ], [ -0.10999999940395355, 0.009999999776482582, 0.019999999552965164, -0.05999999865889549, 0.11999999731779099, 1, 0.15000000596046448, -0.029999999329447746 ], [ 0.029999999329447746, -0.03999999910593033, 0.05000000074505806, 0, -0.019999999552965164, 0.15000000596046448, 1, 0.10000000149011612 ], [ 0.09000000357627869, 0.05999999865889549, -0.009999999776482582, 0.03999999910593033, 0.009999999776482582, -0.029999999329447746, 0.10000000149011612, 1 ] ]
data/parc-AAL116/sub-control3351/sub-control3351_desc-correlation_matrix_parc-AAL116.mat
data/parc-AAL116/sub-control3351/sub-control3351_desc-timeseries_parc-AAL116.mat
[ 116, 116 ]
[ 116 ]
53161c1ea79258bd8243b9fb923fbfb0f6c8427da8c60634e623b4c1cad73deb
107,832
5cf79c9700df2a1875496e4edb00aa988f65de3bb6186736df7216469452f661
195,064
harvard48
sub-control3351
[ [ 1, 0.07999999821186066, 0.019999999552965164, -0.029999999329447746, 0.05999999865889549, 0.009999999776482582, -0.019999999552965164, 0.05000000074505806 ], [ 0.07999999821186066, 1, -0.03999999910593033, 0.07000000029802322, 0.029999999329447746, -0.009999999776482582, 0.03999999910593033, 0.019999999552965164 ], [ 0.019999999552965164, -0.03999999910593033, 1, 0.09000000357627869, 0, 0.05000000074505806, -0.029999999329447746, 0.009999999776482582 ], [ -0.029999999329447746, 0.07000000029802322, 0.09000000357627869, 1, 0.11999999731779099, -0.05000000074505806, 0.05999999865889549, 0 ], [ 0.05999999865889549, 0.029999999329447746, 0, 0.11999999731779099, 1, 0.07999999821186066, -0.019999999552965164, 0.03999999910593033 ], [ 0.009999999776482582, -0.009999999776482582, 0.05000000074505806, -0.05000000074505806, 0.07999999821186066, 1, 0.07000000029802322, -0.019999999552965164 ], [ -0.019999999552965164, 0.03999999910593033, -0.029999999329447746, 0.05999999865889549, -0.019999999552965164, 0.07000000029802322, 1, 0.09000000357627869 ], [ 0.05000000074505806, 0.019999999552965164, 0.009999999776482582, 0, 0.03999999910593033, -0.019999999552965164, 0.09000000357627869, 1 ] ]
data/parc-harvard48/sub-control3351/sub-control3351_desc-correlation_matrix_parc-harvard48.mat
data/parc-harvard48/sub-control3351/sub-control3351_desc-timeseries_parc-harvard48.mat
[ 48, 48 ]
[ 48 ]
9aa5083bddeb70b5cc443747592e117099c3143c64a497e28956d7fb189a2f8b
18,616
69061d32f407981d5f2b2d397f839fdf2ec5b92db084deb4823b00cadadddda1
80,824
kmeans100
sub-control3351
[ [ 1, -0.019999999552965164, 0.03999999910593033, 0.05999999865889549, -0.009999999776482582, 0.029999999329447746, 0.07000000029802322, 0.019999999552965164 ], [ -0.019999999552965164, 1, 0.009999999776482582, -0.05000000074505806, 0.07999999821186066, 0.019999999552965164, -0.029999999329447746, 0.05999999865889549 ], [ 0.03999999910593033, 0.009999999776482582, 1, 0.09000000357627869, -0.019999999552965164, 0.05000000074505806, 0, 0.03999999910593033 ], [ 0.05999999865889549, -0.05000000074505806, 0.09000000357627869, 1, 0.10000000149011612, -0.009999999776482582, 0.029999999329447746, 0.05000000074505806 ], [ -0.009999999776482582, 0.07999999821186066, -0.019999999552965164, 0.10000000149011612, 1, 0.05999999865889549, 0.019999999552965164, -0.029999999329447746 ], [ 0.029999999329447746, 0.019999999552965164, 0.05000000074505806, -0.009999999776482582, 0.05999999865889549, 1, 0.10999999940395355, 0 ], [ 0.07000000029802322, -0.029999999329447746, 0, 0.029999999329447746, 0.019999999552965164, 0.10999999940395355, 1, 0.07999999821186066 ], [ 0.019999999552965164, 0.05999999865889549, 0.03999999910593033, 0.05000000074505806, -0.029999999329447746, 0, 0.07999999821186066, 1 ] ]
data/parc-kmeans100/sub-control3351/sub-control3351_desc-correlation_matrix_parc-kmeans100.mat
data/parc-kmeans100/sub-control3351/sub-control3351_desc-timeseries_parc-kmeans100.mat
[ 100, 100 ]
[ 100 ]
8fccda155468301de2c3ea5c3c37d9f12cd99ce8ee3a3c74d726dbe29b39d02e
80,184
11572befea1db47daaa4c9d8671655ad483b459114643072e865d593a9579b52
168,184
schaefer100
sub-control3351
[ [ 1, 0.029999999329447746, 0.05999999865889549, -0.009999999776482582, 0.019999999552965164, 0.07000000029802322, -0.019999999552965164, 0.03999999910593033 ], [ 0.029999999329447746, 1, -0.019999999552965164, 0.05000000074505806, 0.03999999910593033, 0.009999999776482582, 0.05999999865889549, 0.029999999329447746 ], [ 0.05999999865889549, -0.019999999552965164, 1, 0.10999999940395355, -0.029999999329447746, 0.019999999552965164, 0.03999999910593033, 0.07000000029802322 ], [ -0.009999999776482582, 0.05000000074505806, 0.10999999940395355, 1, 0.07999999821186066, -0.03999999910593033, 0.05000000074505806, 0.019999999552965164 ], [ 0.019999999552965164, 0.03999999910593033, -0.029999999329447746, 0.07999999821186066, 1, 0.05999999865889549, -0.009999999776482582, 0.05000000074505806 ], [ 0.07000000029802322, 0.009999999776482582, 0.019999999552965164, -0.03999999910593033, 0.05999999865889549, 1, 0.09000000357627869, -0.019999999552965164 ], [ -0.019999999552965164, 0.05999999865889549, 0.03999999910593033, 0.05000000074505806, -0.009999999776482582, 0.09000000357627869, 1, 0.10000000149011612 ], [ 0.03999999910593033, 0.029999999329447746, 0.07000000029802322, 0.019999999552965164, 0.05000000074505806, -0.019999999552965164, 0.10000000149011612, 1 ] ]
data/parc-schaefer100/sub-control3351/sub-control3351_desc-correlation_matrix_parc-schaefer100.mat
data/parc-schaefer100/sub-control3351/sub-control3351_desc-timeseries_parc-schaefer100.mat
[ 100, 100 ]
[ 100 ]
186dcfed291fc4a010d339ce3cea60caf82d2ddc08962aa0c5c00294ffe16718
80,184
43c9bf48b2cbaa83fc400be97a42fb260dc2fc7fb0b5f10e388ca6444c35734b
168,184
ward100
sub-control3351
[ [ 1, 0.019999999552965164, -0.029999999329447746, 0.05000000074505806, 0.009999999776482582, -0.019999999552965164, 0.03999999910593033, 0.05999999865889549 ], [ 0.019999999552965164, 1, 0.05000000074505806, -0.009999999776482582, 0.029999999329447746, 0.03999999910593033, -0.019999999552965164, 0.07000000029802322 ], [ -0.029999999329447746, 0.05000000074505806, 1, 0.07999999821186066, -0.03999999910593033, 0.019999999552965164, 0.05999999865889549, 0.009999999776482582 ], [ 0.05000000074505806, -0.009999999776482582, 0.07999999821186066, 1, 0.09000000357627869, -0.029999999329447746, 0.019999999552965164, 0.05000000074505806 ], [ 0.009999999776482582, 0.029999999329447746, -0.03999999910593033, 0.09000000357627869, 1, 0.07000000029802322, -0.009999999776482582, 0.03999999910593033 ], [ -0.019999999552965164, 0.03999999910593033, 0.019999999552965164, -0.029999999329447746, 0.07000000029802322, 1, 0.10000000149011612, -0.019999999552965164 ], [ 0.03999999910593033, -0.019999999552965164, 0.05999999865889549, 0.019999999552965164, -0.009999999776482582, 0.10000000149011612, 1, 0.09000000357627869 ], [ 0.05999999865889549, 0.07000000029802322, 0.009999999776482582, 0.05000000074505806, 0.03999999910593033, -0.019999999552965164, 0.09000000357627869, 1 ] ]
data/parc-ward100/sub-control3351/sub-control3351_desc-correlation_matrix_parc-ward100.mat
data/parc-ward100/sub-control3351/sub-control3351_desc-timeseries_parc-ward100.mat
[ 100, 100 ]
[ 100 ]
7f3a495f5de9a941b1f5bd2cfbd47b0eb51cc26c1bb3b4341b67f9edb3d13a02
80,184
c4d6768352805ed7cf4ba0ed89152a4dff24ea5307def328caf879329c3232f6
168,184

PPMI Connectivity Graphs — HF Staging (Derivatives)

This dataset ships ready-to-use functional brain connectivity graphs derived from the PPMI cohort in a BIDS-ish derivatives layout. For each subject and parcellation, we include:

  • ROI time-series (*_desc-timeseries_parc-<name>.mat)
  • Pearson correlation connectivity matrix (*_desc-correlation_matrix_parc-<name>.mat)
  • JSON sidecars with summary fields (nodes, measure, symmetric/weighted flags)

Contents


data/
parc-<schema>/
sub-<id>/
sub-<id>\_desc-timeseries\_parc-<schema>.mat
sub-<id>\_desc-correlation\_matrix\_parc-<schema>.mat
\*.json
manifests/
manifest.jsonl                # one JSON object per raw file (sha256, bytes, target\_rel)
participants.tsv
phenotype/                      # subject-level variables (if present)
metadata/
raw/                          # resources & summaries used to build the set
artifacts/                    # inventory, checks, B5 manifest & reports
provenance/                   # author notes, dataset summaries, exclusions

Quick start (Python)

from huggingface_hub import snapshot_download
from pathlib import Path
from scipy.io import loadmat

root = Path(snapshot_download(repo_id="<org>/<dataset>", repo_type="dataset", revision="<tag>"))
pid, parc = "sub-prodromal75492", "ward100"
ts = loadmat(root / f"data/parc-{parc}/{pid}/{pid}_desc-timeseries_parc-{parc}.mat")
cm = loadmat(root / f"data/parc-{parc}/{pid}/{pid}_desc-correlation_matrix_parc-{parc}.mat")

# common variable names (fallback-friendly)
X = next((ts.get(k) for k in ["features_timeseries","timeseries","X"] if k in ts), None)   # (nodes × time)
A = next((cm.get(k) for k in ["correlation_matrix","corr","A"] if k in cm), None)          # (nodes × nodes)
print("Timeseries:", None if X is None else X.shape, "  Connectivity:", None if A is None else A.shape)

Use with datasets (viewer‑ready, no scripts)

Note: modern datasets (>= 3.x) does not execute local Python dataset scripts. Use data_files= with Parquet/JSONL as shown below.

You can explore a tiny, fast preview split directly via the datasets library. The preview embeds a small 8×8 top‑left slice of the correlation matrix so the Hugging Face viewer renders rows/columns quickly. Paths to the full on‑disk arrays are included for downstream loading.

from datasets import load_dataset

# Root-level Viewer splits (recommended on the Hub):
#   train.parquet — tiny preview with embedded 8×8 matrices
#   validation.parquet — metadata-only dev slice

ds = load_dataset("pakkinlau/multi-modal-derived-brain-network", data_files="train.parquet", split="train")
row = ds[0]
print(row["parcellation"], row["subject"])      # e.g., 'AAL116', 'sub-control3351'
print(row["corr_shape"], row["ts_shape"])      # e.g., [116, 116], [116]
corr8 = row["correlation_matrix"]               # 8×8 nested list (for display)

# Light dev slice (metadata+paths only). Stream to avoid downloads in CI.
dev = load_dataset("pakkinlau/multi-modal-derived-brain-network", data_files="validation.parquet", split="train", streaming=True)
for ex in dev.take(3):
    _ = (ex["parcellation"], ex["subject"], ex["corr_path"])  # no embedded arrays

You can also use the manifest entrypoints under manifests/:

from datasets import load_dataset

preview = load_dataset("pakkinlau/multi-modal-derived-brain-network", data_files="manifests/preview.parquet", split="train")
dev = load_dataset("pakkinlau/multi-modal-derived-brain-network", data_files="manifests/dev.parquet", split="train", streaming=True)

To access the full arrays, load from the returned corr_path / ts_path using SciPy or mat73 with variable name fallbacks:

from pathlib import Path
from scipy.io import loadmat

root = Path(ds.cache_files[0]["filename"]).parents[2]  # dataset snapshot root (one way to locate)
row = ds[0]
cm = loadmat(root / row["corr_path"])                  # correlation matrix (.mat)
ts = loadmat(root / row["ts_path"])                    # timeseries (.mat)
A = next((cm.get(k) for k in ["correlation_matrix","corr","A"] if k in cm), None)
X = next((ts.get(k) for k in ["features_timeseries","timeseries","X"] if k in ts), None)

Preview vs. dev vs. full

  • preview: tiny split meant for the HF viewer, includes 8×8 correlation_matrix as a nested list plus shapes and file paths (see manifests/preview.parquet).
  • dev: small metadata‑only slice across 1–2 parcellations; yields parcellation, subject, shapes, and file paths (see manifests/dev.parquet).
  • full arrays: kept in‑repo under data/ and referenced by the manifests; load them locally using the variable fallbacks above.

If you use our main analysis repo, you can also load pairs via its adapters (if installed):

from brain_graph.data import hf_pair  # provided by the main repo
# hf_pair(parcellation, subject, root=Path(...)) returns (timeseries, correlation) arrays
X, A = hf_pair("AAL116", "sub-control3351", root=Path("/path/to/local/snapshot"))

Parcellations

  • AAL116 — 116 ROIs
  • harvard48 — 48 ROIs
  • kmeans100 — 100 ROIs
  • schaefer100 — 100 ROIs
  • ward100 — 100 ROIs

File layout

data/
  parc-<parc>/
    sub-<id>/
      <id>_desc-timeseries_parc-<parc>.mat
      <id>_desc-correlation_matrix_parc-<parc>.mat
      *.json   # sidecars
manifests/
  manifest.jsonl         # machine inventory (sha256, bytes, target_rel per file)
  preview.jsonl          # tiny viewer split (subject+paths+8x8)
  preview.parquet        # Parquet version (fast viewer)
  dev.jsonl              # optional light split (metadata+paths only)
  dev.parquet            # Parquet version (fast viewer)

Data files

  • Root (used by the Viewer):
    • train.parquet — tiny viewer‑ready preview with embedded 8×8 correlation matrices
    • validation.parquet — dev metadata‑only slice (no embedded arrays)
  • Manifests (secondary entrypoints):
    • manifests/preview.parquet — same content as train.parquet (if duplicated)
    • manifests/dev.parquet — same as validation.parquet (if duplicated)

Integrity & Checksums

Rows in the preview/dev manifests include *_sha256 and *_bytes for both corr_path and ts_path, derived from manifests/manifest.jsonl. You can verify a local copy by recomputing SHA‑256 and matching the values.

Example (verify a correlation .mat):

import hashlib
from pathlib import Path

def sha256(path: Path, buf=131072):
    h = hashlib.sha256()
    with open(path, 'rb') as f:
        while True:
            b = f.read(buf)
            if not b:
                break
            h.update(b)
    return h.hexdigest()

# compare with row['corr_sha256']

Scripts (optional)

  • scripts/enrich_manifests.py: Enrich preview/dev JSONL with shapes (from sidecars), embedded 8×8 tiles (from preview/), and checksums (from manifests/manifest.jsonl).
  • scripts/jsonl_to_parquet.py: Convert any JSONL to Parquet with a stable schema.
  • scripts/scan_to_manifest.py: Scan data/ to produce a metadata-only JSONL (parcellation, subject, shapes, paths, checksums). Useful for making new dev slices.
  • scripts/make_preview.py: Generate 8×8 correlation previews from .mat files for rows in a manifest. Requires SciPy or mat73 locally.

Cohort & Metadata

  • participants.tsv (+ optional participants.json)
  • phenotype/ (subject-level variables)
  • metadata/raw/, metadata/artifacts/, metadata/provenance/ (provenance, inventories, checks)
  • JSON sidecars colocated with .mat under data/
  • Parquet mirrors (optional, if you add them later)

Integrity

  • A machine manifest lives at manifests/manifest.jsonl (one JSON object per raw file) with SHA-256 and byte size.
  • You can re-compute and verify locally if needed.

License

  • Data (everything under data/, participants.tsv, phenotype/, and metadata tables): CC BY-NC-SA 4.0.
  • Docs & examples (this README, helper scripts): Apache-2.0. See LICENSE for details.

How to cite

See CITATION.cff. Please also acknowledge PPMI and the original derivative providers.

Changelog

  • v1.0.0 — Initial HF release: multi-schema connectivity with cohort tables & provenance.
Downloads last month
251