View source: R/compute_cv_means.R
compute_crossvalidated_means_sl | R Documentation |
This helper function calculates the mean activation pattern for each condition using data from other cross-validation folds.
compute_crossvalidated_means_sl(
sl_data,
mvpa_design,
cv_spec,
estimation_method = "average",
whitening_matrix_W = NULL,
return_folds = FALSE
)
sl_data |
A numeric matrix (samples x voxels/vertices) containing the data for the current searchlight. |
mvpa_design |
The |
cv_spec |
An object describing the cross-validation scheme, typically created
by functions like |
estimation_method |
Character string specifying the method to estimate means.
Currently supported:
Default is |
whitening_matrix_W |
Optional V x V numeric matrix, where V is the number of voxels/features in 'sl_data'. This matrix should be the whitening transformation (e.g., Σ_noise^(-1/2)) derived from GLM residuals. Required and used only if 'estimation_method = "crossnobis"'. |
return_folds |
Logical, if TRUE, the function returns a list containing both the overall mean estimate ('mean_estimate') and an array of per-fold estimates ('fold_estimates'). If FALSE (default), only the overall mean estimate is returned. |
If 'return_folds = FALSE' (default): A numeric matrix (K x V_sl) where K is the number of conditions and V_sl is the number of voxels/vertices in the searchlight. Each row represents the cross-validated mean pattern for condition k. If 'return_folds = TRUE': A list with two elements:
The K x V_sl matrix described above.
A K x V_sl x M array, where M is the number of folds, containing the mean estimate for each condition from each fold.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.