selector
_selector
This file is a base class for the top feature selector.
- class scalr.feature.selector._selector.SelectorBase[source]
Bases:
object
Base class for Feature Selector from scores.
- scalr.feature.selector._selector.build_selector(selector_config: dict) tuple[SelectorBase, dict] [source]
Builder object to get Selector, updated selector_config.
abs_mean
This file is an implementation of the Absolute mean feature selector strategy.
- class scalr.feature.selector.abs_mean.AbsMean(k: int = 1000000.0)[source]
Bases:
SelectorBase
Class for absolute mean feature selector strategy.
It uses the absolute mean across all classes as the score of the feature.
- classmethod get_default_params() dict [source]
Class method to get default params for preprocess_config.
- get_feature_list(score_matrix: DataFrame) list[str] [source]
A function to return top features using score matrix and selector strategy.
- Parameters:
score_matrix (DataFrame) – Score of each feature across all classes [num_classes X num_features].
- Returns:
List of top k features.
- Return type:
list[str]
classwise_abs
This file returns top K features(can be promoters or inhibitors as well) per class.
- class scalr.feature.selector.classwise_abs.ClasswiseAbs(k: int = 1000000.0)[source]
Bases:
SelectorBase
Class for class-wise absolute feature selector strategy.
Classwise scorer returns a dict for each class, containing the top absolute scores of genes.
- classmethod get_default_params() dict [source]
Class method to get default params for preprocess_config.
- get_feature_list(score_matrix: DataFrame)[source]
A function to return top features per class using score matrix and selector strategy.
- Parameters:
score_matrix (DataFrame) – Score of each feature across all classes [num_classes X num_features].
- Returns:
List of top_k features for each class.
- Return type:
dict
classwise_promoters
This file returns top K promoter features per class.
- class scalr.feature.selector.classwise_promoters.ClasswisePromoters(k: int = 1000000.0)[source]
Bases:
SelectorBase
Class for class-wise promoter feature selector strategy.
Classwise scorer returns a dict for each class, containing the top positive scored genes.
- classmethod get_default_params() dict [source]
Class method to get default params for preprocess_config.
- get_feature_list(score_matrix: DataFrame)[source]
A function to return top features per class using score matrix and selector strategy.
- Parameters:
score_matrix (DataFrame) – Score of each feature across all classes [num_classes X num_features].
- Returns:
List of top k features.
- Return type:
list[str]