mvpa_surface_dataset | R Documentation |
Creates a dataset object for surface-based MVPA analysis that encapsulates a training dataset, an optional test dataset, and a vertex mask.
mvpa_surface_dataset(train_data, test_data = NULL, mask = NULL, name = "")
train_data |
The training data set: must inherit from |
test_data |
Optional test data set: must inherit from |
mask |
Optional binary mask for vertices. If NULL, creates mask from training data indices |
name |
Optional label to identify the dataset (e.g., "lh" or "rh" to indicate hemisphere) |
If no mask is provided, one will be created automatically using the indices from the training data. The mask will be a numeric vector with length equal to the number of nodes in the surface geometry.
An mvpa_surface_dataset
object (S3 class) containing:
The training data as a NeuroSurfaceVector
instance
The test data as a NeuroSurfaceVector
instance (if provided)
A numeric vector indicating valid vertices (1) and excluded vertices (0)
Character string identifier for the dataset
Logical flag indicating whether this dataset has a test set
mvpa_dataset
for creating volume-based MVPA datasets
mvpa_design
for creating the corresponding design object
## Not run:
# Create surface dataset with automatic mask
train_surf <- NeuroSurfaceVector(geometry, data)
dataset <- mvpa_surface_dataset(train_surf, name="lh")
# Create dataset with test data and custom mask
test_surf <- NeuroSurfaceVector(geometry, test_data)
mask <- numeric(length(nodes(geometry)))
mask[roi_indices] <- 1
dataset <- mvpa_surface_dataset(train_surf, test_surf, mask, name="rh")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.