Skip to contents

Format Result Object

Usage

format_result(obj, result, error_message, ...)

# S3 method for class 'feature_rsa_model'
format_result(obj, result, error_message = NULL, context, ...)

Arguments

obj

The result object to be formatted.

result

The result object to be formatted.

error_message

An optional error message.

...

Additional arguments to be passed to the method-specific function.

context

Optional contextual metadata (e.g., ROI details) supplied to method implementations.

Examples

# \donttest{
dataset <- gen_sample_dataset(D = c(6, 6, 6), nobs = 20,
                              response_type = "categorical",
                              data_mode = "image")
cval <- blocked_cross_validation(dataset$design$block_var)
model <- load_model("sda_notune")
mspec <- mvpa_model(model, dataset$dataset, dataset$design,
                    "classification", crossval = cval)
# Typically called internally during processing
format_result(mspec, result = NULL, error_message = "example",
              context = list(test = 1, ytest = factor("a")))
#> Error in UseMethod("format_result"): no applicable method for 'format_result' applied to an object of class "c('mvpa_model', 'model_spec', 'list')"
# }