model_fit: Create a Model Fit Object

View source: R/model_fit.R

model_fitR Documentation

Create a Model Fit Object

Description

Constructs a model fit object, representing the result of a single model fit to a chunk of data. The object contains information about the model, response variable, model fit, problem type, model parameters, voxel indices, and an optional feature mask.

Usage

model_fit(
  model,
  y,
  fit,
  model_type = c("classification", "regression"),
  param,
  vox_ind,
  feature_mask = NULL
)

Arguments

model

The caret-style model object.

y

The response variable (predictand).

fit

The fitted model.

model_type

The problem type, either "classification" or "regression" (default). Must be one of the provided options.

param

The model parameters.

vox_ind

The voxel indices indicating the data coordinates.

feature_mask

An optional logical mask indicating the selected subset of columns (features).

Value

An object of class model_fit, containing the model, response variable, fitted model, problem type, model parameters, voxel indices, and optional feature mask. The object is also assigned a class based on the problem type: class_model_fit for classification or regression_model_fit for regression.


bbuchsbaum/rMVPA documentation built on April 23, 2024, 7:35 a.m.