auswahl.FeatureDescriptor¶
- class auswahl.FeatureDescriptor(key: Union[int, Tuple[int, int], FeatureDescriptor], resolve_intervals: bool = False)[source]¶
The class FeatureDescriptor abstracts the configuration of features the selection methods are to retrieve from the spectral data. The FeatureDescriptor wraps either a number of arbitrary features to be selected or a specific number of intervals of features of a fix length.
- Parameters
- key: int, Tuple[int, int], FeatureDescriptor
Feature configuration to be abstracted by the object. A single integer is interpreted as a number of arbitrarily selectable features. A tuple is a (#intervals, width of intervals) configuration of features to be selected. If a FeatureDescriptor is passed, it is copied. All passed integers are required to be non-negative.
- resolve_intervals: bool, default=False
Flag indicating whether interval feature configurations are to be resolved to a single integer of arbitrary features to be selected.
- Attributes
- org_key: int, Tuple[int, int]
Originally passed feature configuration
- key: int, Tuple[int, int]
Resolved key. Equal to org_key, if org_key is not a tuple or if argument resolve_tuples is False
- resolve_intervals: bool
Passed argument resolve_intervals
- __init__(key: Union[int, Tuple[int, int], FeatureDescriptor], resolve_intervals: bool = False)[source]¶
- property comparator¶
Provides a feature configuration representation allowing comparison of FeatureDescriptors.
- get_configuration_for(selector: SpectralSelector)[source]¶
Translate and return the feature configuration for a given
SpectralSelector.- Parameters
- selector: SpectralSelector
SpectralSelector instance
- property string_rep¶
Provides a printing representation for the FeatureDescriptor printing interval configurations as number of intervals and interval width separated via a forward slash.
- Returns
- string representation: str