braindecode.preprocessing.EqualizeBads#
- class braindecode.preprocessing.EqualizeBads(interp_thresh=1.0, copy=True)[source]#
Braindecode preprocessor wrapper for
equalize_bads().Interpolate or mark bads consistently for a list of instances.
Once called on a list of instances, the instances can be concatenated as they will have the same list of bad channels.
- Parameters:
- instslist
The list of instances (Evoked, Epochs or Raw) to consider for interpolation. Each instance should have marked channels.
- interp_threshfloat
A float between 0 and 1 (default) that specifies the fraction of time a channel should be good to be eventually interpolated for certain instances. For example if 0.5, a channel which is good at least half of the time will be interpolated in the instances where it is marked as bad. If 1 then channels will never be interpolated and if 0 all bad channels will be systematically interpolated.
- copybool
If True then the returned instances will be copies.
- Returns:
- insts_badslist
The list of instances, with the same channel(s) marked as bad in all of them, possibly with some formerly bad channels interpolated.
Methods
- fn(interp_thresh=1.0, copy=True)[source]#
Interpolate or mark bads consistently for a list of instances.
Once called on a list of instances, the instances can be concatenated as they will have the same list of bad channels.
- Parameters:
insts (list) – The list of instances (Evoked, Epochs or Raw) to consider for interpolation. Each instance should have marked channels.
interp_thresh (float) – A float between 0 and 1 (default) that specifies the fraction of time a channel should be good to be eventually interpolated for certain instances. For example if 0.5, a channel which is good at least half of the time will be interpolated in the instances where it is marked as bad. If 1 then channels will never be interpolated and if 0 all bad channels will be systematically interpolated.
copy (bool) – If True then the returned instances will be copies.
- Returns:
insts_bads – The list of instances, with the same channel(s) marked as bad in all of them, possibly with some formerly bad channels interpolated.
- Return type: