eegdash.features.decorators#

Module Attributes

univariate_feature

Decorator to mark a feature as univariate.

multivariate_feature

Decorator to mark a feature as multivariate.

Functions

bivariate_feature(func[, directed])

Decorator to mark a feature as bivariate.

Classes

FeatureKind(feature_kind)

A decorator to specify the kind of a feature.

FeaturePredecessor(*parent_extractor_type)

A decorator to specify parent extractors for a feature function.

eegdash.features.decorators.bivariate_feature(func: Callable, directed: bool = False) Callable[source]#

Decorator to mark a feature as bivariate.

This decorator specifies that the feature operates on pairs of channels.

Parameters:
  • func (callable) – The feature extraction function to decorate.

  • directed (bool, default False) – If True, the feature is directed (e.g., connectivity from channel A to B is different from B to A). If False, the feature is undirected.

Returns:

The decorated function with the appropriate bivariate feature kind attached.

Return type:

callable

class eegdash.features.decorators.FeatureKind(feature_kind: MultivariateFeature)[source]#

Bases: object

A decorator to specify the kind of a feature.

This decorator attaches a “feature kind” (e.g., univariate, bivariate) to a feature extraction function.

Parameters:

feature_kind (MultivariateFeature) – An instance of a feature kind class, such as UnivariateFeature or BivariateFeature.

class eegdash.features.decorators.FeaturePredecessor(*parent_extractor_type: List[Type])[source]#

Bases: object

A decorator to specify parent extractors for a feature function.

This decorator attaches a list of parent extractor types to a feature extraction function. This information can be used to build a dependency graph of features.

Parameters:

*parent_extractor_type (list of Type) – A list of feature extractor classes (subclasses of FeatureExtractor) that this feature depends on.

eegdash.features.decorators.multivariate_feature = <eegdash.features.decorators.FeatureKind object>#

Decorator to mark a feature as multivariate.

This is a convenience instance of FeatureKind pre-configured for multivariate features, which operate on all channels simultaneously.

eegdash.features.decorators.univariate_feature = <eegdash.features.decorators.FeatureKind object>#

Decorator to mark a feature as univariate.

This is a convenience instance of FeatureKind pre-configured for univariate features.