fit_model | R Documentation |
Fit a classification or regression model.
fit_model(
obj,
roi_x,
y,
wts,
param,
lev = NULL,
last = FALSE,
classProbs = FALSE,
...
)
obj |
A model fitting object. |
roi_x |
An ROI containing the training data. |
y |
The response vector. |
wts |
A set of case weights. |
param |
Tuning parameters. |
lev |
Factor levels (for classification). |
last |
Logical indicating if this is the last iteration. |
classProbs |
Logical indicating if class probabilities should be returned. |
... |
Additional arguments to be passed to the method-specific function. |
ds <- gen_sample_dataset(
D = c(6, 6, 6), nobs = 20,
response_type = "categorical",
data_mode = "image", nlevels = 2
)
mdl <- load_model("sda_notune")
mspec <- mvpa_model(
model = mdl,
dataset = ds$dataset,
design = ds$design,
model_type = "classification"
)
grid <- tune_grid(mspec, ds$dataset$train_data, ds$design$y_train, len = 1)
fit <- fit_model(mspec, ds$dataset$train_data,
ds$design$y_train, wts = NULL, param = grid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.