mvpa_iterate | R Documentation |
Performs multivariate pattern analysis (MVPA) across multiple regions of interest (ROIs) using batch processing and parallel computation.
mvpa_iterate(
mod_spec,
vox_list,
ids = 1:length(vox_list),
batch_size = as.integer(0.1 * length(ids)),
verbose = TRUE,
processor = NULL,
analysis_type = c("searchlight", "regional")
)
mod_spec |
An MVPA model specification object containing the dataset to analyze, compute_performance (logical indicating whether to compute performance metrics), and return_predictions (logical indicating whether to return predictions). |
vox_list |
A list of voxel indices or coordinates defining each ROI to analyze. |
ids |
Vector of identifiers for each ROI analysis. Defaults to 1:length(vox_list). |
batch_size |
Integer specifying number of ROIs to process per batch. Defaults to 10% of total ROIs. |
verbose |
Logical indicating whether to print progress messages. Defaults to TRUE. |
processor |
Optional custom processing function. If NULL, uses default processor. Must accept parameters (obj, roi, rnum) and return a tibble. |
analysis_type |
Character indicating the type of analysis. Defaults to "searchlight". |
The function processes ROIs in batches to manage memory usage. For each batch:
Extracts ROI data from the dataset.
Filters out ROIs with fewer than 2 voxels.
Processes each ROI using either the default or custom processor.
Combines results across all batches.
A tibble containing results for each ROI with columns:
List column of analysis results (NULL if return_predictions=FALSE).
List column of ROI indices used.
List column of performance metrics (if computed).
ROI identifier.
Logical indicating if an error occurred.
Error message if applicable.
Logical indicating if a warning occurred.
Warning message if applicable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.