eegdash.features.inspect module#

eegdash.features.inspect.get_all_feature_extractors() list[tuple[str, type[FeatureExtractor]]][source]

Get a list of all available FeatureExtractor classes.

Scans the eegdash.features.feature_bank module for all classes that subclass FeatureExtractor.

Returns:

A list of (name, class) tuples for all discovered feature extractors, including the base FeatureExtractor itself.

Return type:

list[tuple[str, type[FeatureExtractor]]]

eegdash.features.inspect.get_all_feature_kinds() list[tuple[str, type[MultivariateFeature]]][source]

Get a list of all available feature ‘kind’ classes.

Scans the eegdash.features.extractors module for all classes that subclass MultivariateFeature.

Returns:

A list of (name, class) tuples for all discovered feature kinds.

Return type:

list[tuple[str, type[MultivariateFeature]]]

eegdash.features.inspect.get_all_features() list[tuple[str, Callable]][source]

Get a list of all available feature functions.

Scans the eegdash.features.feature_bank module for functions that have been decorated to have a feature_kind attribute.

Returns:

A list of (name, function) tuples for all discovered features.

Return type:

list[tuple[str, callable]]

eegdash.features.inspect.get_feature_kind(feature: Callable) MultivariateFeature[source]

Get the ‘kind’ of a feature function.

The feature kind (e.g., univariate, bivariate) is typically attached by a decorator.

Parameters:

feature (callable) – The feature function to inspect.

Returns:

An instance of the feature kind (e.g., UnivariateFeature()).

Return type:

MultivariateFeature

eegdash.features.inspect.get_feature_predecessors(feature_or_extractor: Callable) list[source]

Get the dependency hierarchy for a feature or feature extractor.

This function recursively traverses the parent_extractor_type attribute of a feature or extractor to build a list representing its dependency lineage.

Parameters:

feature_or_extractor (callable) – The feature function or FeatureExtractor class to inspect.

Returns:

A nested list representing the dependency tree. For a simple linear chain, this will be a flat list from the specific feature up to the base FeatureExtractor. For multiple dependencies, it will contain tuples of sub-dependencies.

Return type:

list