mvpa_design | R Documentation |
Constructs an MVPA design object, defining the classification or regression problem for Multi-Variate Pattern Analysis (MVPA). It handles different configurations of input datasets, response variables, and optional parameters, such as blocking variables and group structures.
mvpa_design(
train_design,
y_train,
test_design = NULL,
y_test = NULL,
block_var = NULL,
split_by = NULL
)
train_design |
A |
y_train |
A |
test_design |
An optional |
y_test |
An optional |
block_var |
An optional |
split_by |
An optional |
An object of class mvpa_design
, containing the training and optional test design, response variables, blocking variable, and group structure.
df1 <- data.frame(y = rep(letters[1:4], 5), x1 = rnorm(20), x2 = rnorm(20), block = rep(1:4, each = 5))
des <- mvpa_design(df1, ~ y, block_var = ~ block)
## With a test set
testdes <- data.frame(y = sample(letters[1:4], 10))
des <- mvpa_design(df1, ~ y, block_var = ~ block, test_design = testdes, y_test = ~ y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.