Skip to contents

This function implements the generic logic for running a searchlight:

  1. Checks radius and method.

  2. For "standard" searchlight, calls do_standard(...).

  3. For "randomized", calls do_randomized(...) with niter times.

  4. Handles the combiner function or string ("pool", "average").

Usage

run_searchlight_base(
  model_spec,
  radius = 8,
  method = c("randomized", "standard"),
  niter = 4,
  combiner = "average",
  ...
)

Arguments

model_spec

A model specification object (e.g., mvpa_model, vector_rsa_model, etc.).

radius

Numeric searchlight radius (1 to 100).

method

Character: "standard" or "randomized".

niter

Number of iterations if method="randomized".

combiner

Either a function that combines partial results or a string ("pool", "average") that selects a built-in combiner.

...

Additional arguments passed on to do_standard or do_randomized.

Value

The result object from do_standard or do_randomized (often a searchlight_result or similar).

Details

It does not assume any specific model type, but expects that model_spec is compatible with do_standard(...) or do_randomized(...) in your code.