train_model.vector_rsa_model: Train a vector RSA model

View source: R/vector_rsa_model.R

train_model.vector_rsa_modelR Documentation

Train a vector RSA model

Description

Train a vector RSA model

Usage

## S3 method for class 'vector_rsa_model'
train_model(obj, train_dat, y, indices, ...)

Arguments

obj

An object of class vector_rsa_model.

train_dat

A data frame or matrix representing the training subset (e.g., voxel intensities).

y

Not used in vector RSA (here for consistency with other train_model generics).

indices

The spatial indices of the training data (ROI, searchlight, etc.).

...

Additional arguments.

Value

A structure containing "scores" or similar second-order similarity results.

Examples


  dset_info <- gen_sample_dataset(D = c(8, 8, 8), nobs = 20,
    response_type = "categorical", data_mode = "image", nlevels = 2)
  vdesign <- vector_rsa_design(2, dset_info$design$y_train,
    dset_info$design$block_var)
  vmodel <- vector_rsa_model(dset_info$dataset, vdesign)
  train_model(vmodel, dset_info$dataset$train_data,
    dset_info$design$y_train,
    indices = seq_len(ncol(dset_info$dataset$train_data)))


bbuchsbaum/rMVPA documentation built on June 10, 2025, 8:23 p.m.