feature
Represent a feature object.
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. |
__all__ = ['BaseFeature', 'ExplainableFeature', 'IndexMetadata']
#
AbstractFeature
#
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
|
|
FeatureTypeUnion
|
|
required |
|
Feature type. |
required | |
|
TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor
|
The feature preprocessor function used to preprocess the data. |
required |
|
str
|
|
required |
|
FeatureAugmentation | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
to_model |
Convert to FeatureInsert instance. |
stable_hash |
Return a hash, without the id. |
Attributes:
| Name | Type | Description |
|---|---|---|
feature_type |
FeatureTypeUnion
|
|
preprocessor |
TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor | BoundingBoxesPreprocessor
|
|
augmentation |
FeatureAugmentation | None
|
|
feature_type: FeatureTypeUnion = field(kw_only=True)
#
preprocessor: TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor | BoundingBoxesPreprocessor = field(kw_only=True)
#
augmentation: FeatureAugmentation | None = field(kw_only=True, default=None)
#
to_model() -> FeatureInsert
#
Convert to FeatureInsert instance.
Source code in src/xpdeep/dataset/feature/feature.py
stable_hash() -> str
#
Return a hash, without the id.
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 | None
|
|
None
|
|
str
|
|
'xpdeep_index'
|
Methods:
| Name | Description |
|---|---|
to_model |
Convert to IndexMetadataInsert instance. |
stable_hash |
Return a hash, without the id. |
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
|
id |
str | None
|
|
feature_type |
str
|
|
feature_from_model(json_response: dict[str, object]) -> BaseFeature | ExplainableFeature | IndexMetadata
#
Convert json exposed features into corresponding Feature.