bids.modeling.auto_model

auto_model(layout, scan_length=None, one_vs_rest=False)[source]

Create a simple default model for each of the tasks in a BIDSLayout. Contrasts each trial type against all other trial types and trial types at the run level and then uses dummy contrasts at each other level present to aggregate these results up.

Parameters:
  • layout (bids.layout.BIDSLayout) – A BIDSLayout instance

  • scan_length (int) – Scan length for loading event variables in cases where the scan length can not be read from the nifti. Primarily for testing.

  • one_vs_rest (bool) – Set to True if you would like to autogenerate contrasts of each trial type against everyother trialtype.

Returns:

list of model dictionaries for each task

Return type:

list