specparam.objs.average_group

specparam.objs.average_group(group, bands, avg_method='mean', regenerate=True)[source]

Average across model fits in a group model object.

Parameters:
groupSpectralGroupModel

Object with model fit results to average across.

bandsBands

Bands object that defines the frequency bands to collapse peaks across.

avg{‘mean’, ‘median’}

Averaging function to use.

regeneratebool, optional, default: True

Whether to regenerate the model for the averaged parameters.

Returns:
modelSpectralModel

Object containing the average model results.

Raises:
ValueError

If the requested averaging method is not understood.

NoModelError

If there are no model fit results available to average across.

Examples using specparam.objs.average_group

Manipulating Objects

Manipulating Objects