blueetl.features¶
Features collection.
Classes
|
ConcatenatedFeatures class. |
|
FeaturesCollection class. |
|
Group of common keys used to build a group of FeaturesConfig. |
|
FilteredFeaturesCollection class. |
- class blueetl.features.ConcatenatedFeatures(parent: FeaturesCollection, configs: dict[str, FeaturesConfig] | None = None)¶
Bases:
object
ConcatenatedFeatures class.
It can be used to view as a single DataFrame all the features calculated for various combinations of parameters.
Initialize the object.
- property aliases: DataFrame¶
Return the varying column names used as parameters and their aliases.
- clear_cache() None ¶
Clear the cached properties.
- clone(parent: FeaturesCollection) ConcatenatedFeatures ¶
Return a copy using the same config and the new parent.
- property df: DataFrame¶
Return the concatenation of features.
- property params: DataFrame¶
Return all the parameters as a DataFrame.
- update(feature_name: str, features_config: FeaturesConfig) None ¶
Update the list of features and configurations.
- class blueetl.features.FeaturesCollection(features_configs: list[FeaturesConfig], repo: Repository, cache_manager: CacheManager)¶
Bases:
object
FeaturesCollection class.
Initialize the FeaturesCollection from the given list of configurations.
- Parameters:
features_configs – list of features configuration dicts.
repo – Repository instance.
cache_manager – CacheManager instance.
- apply_filter(repo: Repository) FeaturesCollection ¶
Apply a filter based on the extracted simulations and return a new object.
- property cache_manager: CacheManager¶
Access to the cache manager.
- calculate() None ¶
Calculate all the features based on the configuration.
- property names: list[str]¶
Return the names of all the calculated features.
- show() None ¶
Print some information about the instance, mainly for debug and inspection.
- class blueetl.features.FeaturesConfigKey(groupby: list[str], neuron_classes: list[str], windows: list[str])¶
Bases:
object
Group of common keys used to build a group of FeaturesConfig.
FeaturesConfig in the same group are grouped and processed together.
Warning: the keys are considered immutable, and must not be modified after the object creation.
- classmethod from_config(config: FeaturesConfig) FeaturesConfigKey ¶
Return an instance from the given FeaturesConfig.
- class blueetl.features.FilteredFeaturesCollection(parent: FeaturesCollection, repo: Repository)¶
Bases:
FeaturesCollection
FilteredFeaturesCollection class.
Init from an existing FeaturesCollection filtered by the simulations ids in repo.
Filtered dataframes are never written to disk.