spectralbrain.utils.datasets#
Template data, example datasets, and public dataset fetchers.
Provides quick access to template geometries (fsaverage, MNI152) and synthetic example datasets for tutorials and testing.
Functions
|
Quick point cloud for testing. |
|
Quick sphere mesh for testing. |
|
Load fsaverage template surfaces from nibabel's bundled data. |
|
Generate synthetic geometric connectomes for two groups. |
|
Generate synthetic bilateral descriptors for asymmetry analysis. |
|
Generate a synthetic normative cohort with age effects. |
|
Generate a two-group synthetic dataset for tutorials. |
- spectralbrain.utils.datasets.example_point_cloud(n_points=1000, shape='sphere', seed=0)[source]#
Quick point cloud for testing.
- spectralbrain.utils.datasets.example_sphere(n_lat=30, n_lon=60, radius=50.0)[source]#
Quick sphere mesh for testing.
- spectralbrain.utils.datasets.fetch_fsaverage(mesh='pial', hemisphere='lh')[source]#
Load fsaverage template surfaces from nibabel’s bundled data.
- spectralbrain.utils.datasets.make_connectome_example(n_subjects=40, n_parcels=50, n_networks=5, group_effect=0.3, seed=42)[source]#
Generate synthetic geometric connectomes for two groups.
- spectralbrain.utils.datasets.make_laterality_example(n_subjects=40, n_features=50, asymmetry=0.3, seed=42)[source]#
Generate synthetic bilateral descriptors for asymmetry analysis.
- spectralbrain.utils.datasets.make_normative_example(n_subjects=200, n_vertices=500, age_range=(20, 80), seed=42)[source]#
Generate a synthetic normative cohort with age effects.
- spectralbrain.utils.datasets.make_two_group_example(n_per_group=30, n_vertices=500, n_scales=10, effect_size=0.5, seed=42)[source]#
Generate a two-group synthetic dataset for tutorials.
Creates descriptors for controls and patients with a focal spectral difference at a subset of vertices.
- Parameters:
- Returns:
dict – Keys:
"controls"(n, N, T),"patients"(n, N, T),"labels"(2n,),"affected_vertices"(bool mask),"ages"(2n,),"metadata".- Return type: