eegdash.features.inspect#

Functions

get_all_feature_extractors()

Get a list of all available feature extractor callables.

get_all_feature_preprocessors()

Get a list of all available preprocessor functions.

get_all_feature_kinds()

Get a list of all available feature 'kind' classes.

get_all_features()

Get a list of all available feature functions.

get_feature_kind(feature)

Get the 'kind' of a feature function.

get_feature_predecessors(feature_or_extractor)

Get the dependency hierarchy for a feature or feature extractor.

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

Get a list of all available feature extractor callables.

A feature extractor is any callable in the feature bank that participates in the feature graph, meaning it declares a parent_extractor_type via FeaturePredecessor. This includes both preprocessors and the final feature functions.

Returns:

A list of (name, callable) tuples for all discovered feature extractors.

Return type:

list[tuple[str, callable]]

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

Get a list of all available preprocessor functions.

Scans the eegdash.features.feature_bank module for all preprocessor functions.

Returns:

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

Return type:

list[tuple[str, Callable]]

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[eegdash.features.extractors.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 | None) 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