schema
Schemas.
Classes:
Name | Description |
---|---|
Schema |
Schema definition. Used as base class for AnalyzedSchema and FittedSchema classes. |
AnalyzedSchema |
A schema which represents the raw data structure: feature types and positions. |
FittedSchema |
A schema which represents the raw data structure: feature types and positions. |
Schema(*features: _FEATURE_TYPE)
#
Schema definition. Used as base class for AnalyzedSchema and FittedSchema classes.
Initialize the class with the specified features.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
_FEATURE_TYPE
|
A variable number of features to be included. These features will be stored
in the |
()
|
Attributes:
Name | Type | Description |
---|---|---|
columns |
list[_FEATURE_TYPE]
|
A list containing the features provided during initialization. |
Methods:
Name | Description |
---|---|
__getitem__ |
Get a feature. |
__repr__ |
Represent the schema. |
Attributes:
Name | Type | Description |
---|---|---|
columns |
list[_FEATURE_TYPE]
|
|
Source code in src/xpdeep/dataset/schema/schema.py
columns: list[_FEATURE_TYPE] = list(features)
#
__getitem__(feature_name: str) -> _FEATURE_TYPE
#
Get a feature.
Source code in src/xpdeep/dataset/schema/schema.py
__repr__() -> str
#
Represent the schema.
Source code in src/xpdeep/dataset/schema/schema.py
AnalyzedSchema(*features: _FEATURE_TYPE)
#
A schema which represents the raw data structure: feature types and positions.
Initialize the class with the specified features.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
_FEATURE_TYPE
|
A variable number of features to be included. These features will be stored
in the |
()
|
Attributes:
Name | Type | Description |
---|---|---|
columns |
list[_FEATURE_TYPE]
|
A list containing the features provided during initialization. |
Methods:
Name | Description |
---|---|
from_exposed |
Convert ExposedAnalyzedSchema to AnalyzedSchema. |
from_bytes |
Convert bytes to analyzed schema. |
remove_feature |
Remove the feature with the given name from the schema, and return the removed feature. |
__setitem__ |
Set the feature with the given name from the parquet dataset analyzed schema. |
__delitem__ |
Delete feature. |
Attributes:
Name | Type | Description |
---|---|---|
as_exposed |
ExposedAnalyzedSchema
|
Return exposed analyzed schema. |
Source code in src/xpdeep/dataset/schema/schema.py
as_exposed: ExposedAnalyzedSchema
#
Return exposed analyzed schema.
from_exposed(exposed_analyzed_schema: ExposedAnalyzedSchema) -> AnalyzedSchema
#
Convert ExposedAnalyzedSchema to AnalyzedSchema.
Source code in src/xpdeep/dataset/schema/schema.py
from_bytes(analyzed_schema_as_bytes: bytes) -> AnalyzedSchema
#
Convert bytes to analyzed schema.
remove_feature(feature_name: str) -> Feature | BaseFeature | Metadata
#
Remove the feature with the given name from the schema, and return the removed feature.
Source code in src/xpdeep/dataset/schema/schema.py
__setitem__(feature_name: str, new_feature: Feature) -> None
#
Set the feature with the given name from the parquet dataset analyzed schema.
Source code in src/xpdeep/dataset/schema/schema.py
FittedSchema(*features: Feature | Metadata, input_size: tuple[int, ...] | None = None, target_size: tuple[int, ...] | None = None)
#
A schema which represents the raw data structure: feature types and positions.
FittedSchema constructor.
Methods:
Name | Description |
---|---|
from_exposed |
Convert ExposedFittedSchema to FittedSchema. |
from_bytes |
Convert bytes to fitted schema. |
Attributes:
Name | Type | Description |
---|---|---|
input_size |
|
|
target_size |
|
|
as_exposed |
ExposedFittedSchema
|
Return exposed fitted schema. |
Source code in src/xpdeep/dataset/schema/schema.py
input_size = input_size
#
target_size = target_size
#
as_exposed: ExposedFittedSchema
#
Return exposed fitted schema.
from_exposed(exposed_fitted_schema: ExposedFittedSchema) -> FittedSchema
#
Convert ExposedFittedSchema to FittedSchema.
Source code in src/xpdeep/dataset/schema/schema.py
from_bytes(fitted_schema_as_bytes: bytes) -> FittedSchema
#
Convert bytes to fitted schema.