feature
The features module provides a list of feature object to be used to define the dataset structure.
Modules:
Name | Description |
---|---|
abstracts |
Feature abstract classes module. |
augmentation |
feature's utils. |
feature |
Represent a feature object. |
feature_types |
Feature types module. |
Classes:
Name | Description |
---|---|
BaseFeature |
Base Feature used if no convenient available feature. |
ExplainableFeature |
Define a feature object. |
IndexMetadata |
Represents an index metadata, automatically added to the schema, cf doc dataset/concept. |
FeatureConvertor |
Class for converting exposed features into feature. |
BaseFeature
#
Base Feature used if no convenient available feature.
Methods:
Name | Description |
---|---|
from_exposed |
BaseFeature from ExposedBaseFeature. |
as_exposed |
BaseFeature as ExposedBaseFeature. |
from_exposed(exposed_feature: ExposedBaseFeature) -> BaseFeature
#
ExplainableFeature
#
Define a feature object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
UUID | None
|
Feature Identifier |
None
|
|
bool
|
Whether the feature is target or not. |
False
|
|
TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor
|
The feature preprocessor function used to preprocess the data. |
required |
|
ImageFeatureAugmentation | None
|
Feature augmentation functions, currently supported: ImageFeatureAugmentation. |
None
|
Methods:
Name | Description |
---|---|
from_exposed |
Convert exposed feature to feature as dict. |
as_exposed |
Explainable Feature as ExposedFeatureWithPreprocessor. |
Attributes:
Name | Type | Description |
---|---|---|
preprocessor |
TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor
|
|
feature_augmentation |
ImageFeatureAugmentation | None
|
|
preprocessor: TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor = field(kw_only=True)
#
feature_augmentation: ImageFeatureAugmentation | None = field(kw_only=True, default=None)
#
from_exposed(exposed_feature: ExposedFeatureWithPreprocessor) -> ExplainableFeature
#
Convert exposed feature to feature as dict.
Source code in src/xpdeep/dataset/feature/feature.py
as_exposed(*, with_augmentation: bool) -> ExposedFeatureWithPreprocessor | ExposedFeatureWithAugmentation
#
Explainable Feature as ExposedFeatureWithPreprocessor.
Source code in src/xpdeep/dataset/feature/feature.py
IndexMetadata
#
Represents an index metadata, automatically added to the schema, cf doc dataset/concept.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
|
required |
|
str
|
|
'xpdeep_index'
|
Methods:
Name | Description |
---|---|
as_exposed |
Generate the corresponding exposed ExposedIndexMetadata. |
from_exposed |
Create IndexMetadata from ExposedIndexMetadata. |
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
|
feature_type |
str
|
|
FeatureConvertor
#
Class for converting exposed features into feature.
For instance, it recognizes an ExposedBaseFeature and instantiate corresponding BaseFeature.
Methods:
Name | Description |
---|---|
from_exposed |
Convert exposed feature into feature. |
from_exposed(exposed_feature: ExposedBaseFeature | ExposedFeatureWithPreprocessor | ExposedIndexMetadata) -> BaseFeature | ExplainableFeature | IndexMetadata
#
Convert exposed feature into feature.