vector
Vector feature and type alias.
Classes:
| Name | Description |
|---|---|
VectorFeature |
Feature representing a vector composed of multiple sub-features. |
MultivariateNumericalFeature |
MultivariateNumericalFeature feature. |
VectorFeature
#
Feature representing a vector composed of multiple sub-features.
A vector feature encapsulates a collection of individual feature components (for example, numerical or categorical) grouped together under named channels. Each element of the vector corresponds to a distinct dimension identified by a channel name, and all elements share the same underlying feature type.
This structure is suitable for representing multidimensional entities such as
coordinates, embeddings, or multi-attribute descriptors. For instance, a 3D point
can be represented as a vector of three numerical features with channel names
("x", "y", "z"). Ideally, the channels of a vector feature should be
statistically independent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ItemType
|
The feature type associated with each channel. This defines the structure and semantics of the individual vector components. |
required |
|
tuple[str, ...]
|
Sequence of names identifying each channel in the vector. The order of the names must match the order of the corresponding feature components. |
required |
Methods:
| Name | Description |
|---|---|
to_model |
Convert to a |
from_model |
Instantiate from a json response. |
Attributes:
| Name | Type | Description |
|---|---|---|
items |
ItemType
|
|
channel_names |
tuple[str, ...]
|
|
name |
Literal['VECTOR']
|
|
items: ItemType
#
channel_names: tuple[str, ...]
#
name: Literal['VECTOR'] = 'VECTOR'
#
to_model() -> VectorFeatureTypeInput
#
Convert to a VectorFeatureTypeInput instance.
Returns:
| Type | Description |
|---|---|
VectorFeatureTypeInput
|
Model-level representation of the vector feature, including its channel names and the serialized form of its item feature type. |
Source code in src/xpdeep/dataset/feature/feature_types/vector.py
from_model(feature_type_input: VectorFeatureTypeInput) -> VectorFeature[ItemType]
#
Instantiate from a json response.
Source code in src/xpdeep/dataset/feature/feature_types/vector.py
MultivariateNumericalFeature
#
MultivariateNumericalFeature feature.
It is an alias for a VectorFeature of Numerical items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
List[str]
|
List of channel names used for visualization. |
required |
Notes
- Conceptually equivalent to:
VectorFeature(items=NumericalFeature, channel_names).
Attributes:
| Name | Type | Description |
|---|---|---|
items |
str
|
|
Methods:
| Name | Description |
|---|---|
__attrs_post_init__ |
Update categories. |