mvpa_dataset | R Documentation |
Creates a dataset object for MVPA analysis that encapsulates a training dataset, an optional test dataset, and a voxel mask.
mvpa_dataset(train_data, test_data = NULL, mask)
train_data |
The training data set: a |
test_data |
Optional test data set: a |
mask |
The set of voxels to include: a |
An mvpa_dataset
object (S3 class) containing:
The training data as a NeuroVec
instance
The test data as a NeuroVec
instance (if provided, otherwise NULL)
The binary mask defining valid voxels as a NeuroVol
instance
Logical flag indicating whether this dataset has a test set
mvpa_surface_dataset
for creating surface-based MVPA datasets
mvpa_design
for creating the corresponding design object
# Create dataset from NeuroVec objects
train_vec <- NeuroVec(array(rnorm(1000*100), c(10,10,10,100)))
mask_vol <- NeuroVol(array(1, c(10,10,10)))
dataset <- mvpa_dataset(train_vec, mask=mask_vol)
# Create dataset with test data
test_vec <- NeuroVec(array(rnorm(1000*20), c(10,10,10,20)))
dataset_with_test <- mvpa_dataset(train_vec, test_vec, mask=mask_vol)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.