Feature extractors
Default feature extractor for 1 animals and 14 body-parts
- class simba.feature_extractors.feature_extractor_14bp.ExtractFeaturesFrom14bps(config_path: str)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from two animals with 7 tracked body-parts each. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom14bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 1 animals and 16 body-parts
- class simba.feature_extractors.feature_extractor_16bp.ExtractFeaturesFrom16bps(config_path: str)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from two animals with 8 tracked body-parts each. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom16bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 1 animals and 4 body-parts
- class simba.feature_extractors.feature_extractor_4bp.ExtractFeaturesFrom4bps(config_path: Union[str, PathLike])[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data with one animal and 4 tracked body-parts. Results are stored in the
project_folder/csv/features_extracted
directory of the SimBA project.- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom4bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 1 animals and 7 body-parts
- class simba.feature_extractors.feature_extractor_7bp.ExtractFeaturesFrom7bps(config_path: Union[str, PathLike])[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from single animals with 7 tracked body-parts. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom7bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 1 animals and 8 body-parts
- class simba.feature_extractors.feature_extractor_8bp.ExtractFeaturesFrom8bps(config_path: Union[str, PathLike])[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from single animals with 8 tracked body-parts. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom8bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 2 animals and 16 body-parts
- class simba.feature_extractors.feature_extractor_8bps_2_animals.ExtractFeaturesFrom8bps2Animals(config_path: str)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from two animals with 4 tracked body-parts each. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom8bps2Animals(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for 1 animals and 9 body-parts
- class simba.feature_extractors.feature_extractor_9bp.ExtractFeaturesFrom9bps(config_path: str)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Extracts hard-coded set of features from pose-estimation data from single animals with 9 tracked body-parts. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = ExtractFeaturesFrom9bps(config_path='MyProjectConfig') >>> feature_extractor.run()
Default feature extractor for user-defined body-parts
- class simba.feature_extractors.feature_extractor_user_defined.UserDefinedFeatureExtractor(config_path: str)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
Generic featurizer of data within SimBA project using user-defined body-parts in the pose-estimation data. Results are stored in the project_folder/csv/features_extracted directory of the SimBA project.
- Parameters
config_path (str) – path to SimBA project config file in Configparser format
Examples
>>> feature_extractor = UserDefinedFeatureExtractor(config_path='MyProjectConfig') >>> feature_extractor.run()
Feature extractor for feature subset family
- class simba.feature_extractors.feature_subsets.FeatureSubsetsCalculator(config_path: Union[str, PathLike], save_dir: Optional[Union[str, PathLike]], feature_families: List[str], include_file_checks: Optional[bool] = False, append_to_features_extracted: Optional[bool] = False, append_to_targets_inserted: Optional[bool] = False)[source]
Bases:
ConfigReader
,FeatureExtractionMixin
,TrainModelMixin
Computes a subset of features from pose for non-ML downstream purposes. E.g., returns the size of animal convex hull in each frame.
- Parameters
Note
Tutorial <https://github.com/sgoldenlab/simba/blob/master/docs/feature_subsets.md>_
Examples
>>> _ = FeatureSubsetsCalculator(config_path='project_folder/project_config.ini', feature_family='Frame-by-frame body-parts inside ROIs (Boolean)', save_dir='data').run()