Transforms¶
Instance Transforms¶
Classes
|
Scale the input to range from low to high |
|
Maps various channel sets into the Deep10-10 scheme, and normalizes data between [-1, 1] with an additional scaling parameter to describe the relative scale of a trial with respect to the entire dataset. |
|
|
|
Z-score normalization of trials |
Functions
|
Validate that all the channel sets are consistent, return false if not |
-
class
dn3.transforms.instance.
FixedScale
(low_bound=- 1, high_bound=1)¶ Scale the input to range from low to high
-
class
dn3.transforms.instance.
MappingDeep1010
(dataset, add_scale_ind=True, return_mask=False)¶ Maps various channel sets into the Deep10-10 scheme, and normalizes data between [-1, 1] with an additional scaling parameter to describe the relative scale of a trial with respect to the entire dataset.
TODO - refer to eventual literature on this
Methods
new_channels
(old_channels)This is an optional method that indicates the transformation modifies the representation and/or presence of channels.
-
new_channels
(old_channels: numpy.ndarray)¶ This is an optional method that indicates the transformation modifies the representation and/or presence of channels.
- Parameters
old_channels (ndarray) – An array whose last two dimensions are channel names and channel types.
- Returns
new_channels – An array with the channel names and types after this transformation. Supports the addition of dimensions e.g. a list of channels into a rectangular grid, but the final two dimensions must remain the channel names, and types respectively.
- Return type
ndarray
-
-
class
dn3.transforms.instance.
NoisyBlankDeep1010
(mask_index=1, purge_mask=False)¶
-
class
dn3.transforms.instance.
ZScore
(only_trial_data=True)¶ Z-score normalization of trials
-
dn3.transforms.instance.
same_channel_sets
(channel_sets: list)¶ Validate that all the channel sets are consistent, return false if not
Preprocessors¶
Classes
Base class for various preprocessing actions. |
-
class
dn3.transforms.preprocessors.
Preprocessor
¶ Base class for various preprocessing actions. Sub-classes are called with a subclass of _Recording and operate on these instances in-place.
Any modifications to data specifically should be implemented through a subclass of
BaseTransform
, and returned by the methodget_transform()
Methods
Generate and return any transform associated with this preprocessor.
-
get_transform
()¶ Generate and return any transform associated with this preprocessor. Should be used after applying this to a dataset, i.e. through
DN3ataset.preprocess()
- Returns
transform
- Return type
BaseTransform
-