Create an MVPA Dataset for Clustered/Parcellated Data
Source:R/clustered_dataset.R
mvpa_clustered_dataset.RdCreates a dataset object for MVPA analysis on parcellated brain data stored
as ClusteredNeuroVec objects from neuroim2. A "clustered searchlight"
iterates over all K parcels, pooling nearby parcels as features for each analysis.
Value
An mvpa_clustered_dataset object (S3 class) containing:
- train_data
The training data as a
ClusteredNeuroVec.- test_data
The test data (if provided).
- mask
The mask.
- cvol
The
ClusteredNeuroVoldefining cluster assignments.- region_mask
A
NeuroVolwhere each voxel's value is its cluster ID (for broadcasting results viamap_values).- has_test_set
Logical flag.
Examples
ds <- gen_clustered_sample_dataset(D = c(5, 5, 5), nobs = 20, K = 5)
print(ds$dataset)
#>
#> Clustered MVPA Dataset
#>
#> - Clusters: 5
#> - Observations: 20
#> - Test set: no
#>