train_model.rsa_model: Train an RSA Model

View source: R/mvpa_iterate.R

train_model.rsa_modelR Documentation

Train an RSA Model

Description

This function trains an RSA (representational similarity analysis) model using the specified method and distance calculation.

Usage

## S3 method for class 'rsa_model'
train_model(
  obj,
  train_dat,
  indices,
  wts = NULL,
  method = c("lm", "rfit", "pearson", "spearman"),
  distmethod = c("pearson", "spearman"),
  ...
)

Arguments

obj

An object of class rsa_model.

train_dat

The training data.

indices

The indices of the training data.

wts

Optional, the weights for the model training.

method

The method used for model training. One of "lm" (linear regression), "rfit" (robust regression), "pearson" (Pearson correlation), or "spearman" (Spearman correlation). Default is "lm".

distmethod

The method used for distance calculation. One of "pearson" (Pearson correlation) or "spearman" (Spearman correlation). Default is "pearson".

...

Additional arguments passed to the training method.

Value

The trained model.


bbuchsbaum/rMVPA documentation built on April 28, 2024, 6:30 a.m.