feature
Represent a feature object.
Classes:
Name | Description |
---|---|
BaseFeature |
Base Feature used if no convenient available feature. |
NumericalFeature |
Numerical feature. |
CategoricalFeature |
Categorical feature. |
MultivariateNumericalFeature |
MultivariateNumericalFeature feature. |
UnivariateSynchronousTimeSerie |
UnivariateSynchronousTimeSerie feature. |
UnivariateAsynchronousTimeSerie |
UnivariateAsynchronousTimeSerie feature. |
MultivariateSynchronousTimeSerie |
MultivariateSynchronousTimeSerie feature. |
MultivariateAsynchronousTimeSerie |
MultivariateAsynchronousTimeSerie feature. |
Metadata |
Metadata. |
Attributes:
Name | Type | Description |
---|---|---|
ExposedFeature |
|
|
Feature |
|
__all__ = ['BaseFeature', 'CategoricalFeature', 'ExposedFeature', 'Feature', 'Metadata', 'MultivariateAsynchronousTimeSerie', 'MultivariateNumericalFeature', 'MultivariateSynchronousTimeSerie', 'NumericalFeature', 'UnivariateAsynchronousTimeSerie', 'UnivariateSynchronousTimeSerie']
#
ExposedFeature = ExposedCategoricalFeature | ExposedCategoricalFeatureList | ExposedNumericalFeature | ExposedMultivariateNumericalFeature | ExposedUnivariateSynchronousTimeSerie | ExposedUnivariateAsynchronousTimeSerie | ExposedMultivariateSynchronousTimeSerie | ExposedMultivariateAsynchronousTimeSerie | ExposedMetadata
#
EXPOSED_FEATURE_TYPE = TypeVar('EXPOSED_FEATURE_TYPE', bound=ExposedFeature)
#
Feature = NumericalFeature | CategoricalFeature | MultivariateNumericalFeature | UnivariateSynchronousTimeSerie | UnivariateAsynchronousTimeSerie | MultivariateSynchronousTimeSerie | MultivariateAsynchronousTimeSerie | Metadata
#
AbstractDataElement
#
TargetableFeature
#
BaseFeature
#
Base Feature used if no convenient available feature.
Methods:
Name | Description |
---|---|
from_exposed |
BaseFeature from ExposedBaseFeature. |
Attributes:
Name | Type | Description |
---|---|---|
as_exposed |
ExposedBaseFeature
|
NumericalFeature as ExposedNumericalFeature. |
ExplainableFeature
#
Define a feature object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
SklearnPreprocessor | IdentityPreprocessor
|
feature preprocessor function used to preprocess the data. |
required |
Methods:
Name | Description |
---|---|
from_exposed |
Feature from exposed feature. |
Attributes:
Name | Type | Description |
---|---|---|
preprocessor |
TorchPreprocessor | SklearnPreprocessor | IdentityPreprocessor
|
|
as_exposed |
EXPOSED_FEATURE_TYPE
|
Feature as exposed feature. |
NumericalFeature
#
Numerical feature.
It represents quantifiable values that can be measured and ordered. Its values may be continuous (e.g., real numbers) or discrete (e.g., integers). For instance, "age" or "price" could be set as numerical features.
Methods:
Name | Description |
---|---|
from_exposed |
NumericalFeature from ExposedNumericalFeature. |
Attributes:
Name | Type | Description |
---|---|---|
as_exposed |
ExposedNumericalFeature
|
NumericalFeature as ExposedNumericalFeature. |
CategoricalFeature
#
Categorical feature.
It represents data that can be divided into distinct groups or categories.
It may be nominal or ordinal. For instance, "Education level" or "gender" could be set as categorical features.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
list[Union[str, int, bool]]
|
|
required |
Methods:
Name | Description |
---|---|
from_exposed |
CategoricalFeature from ExposedCategoricalFeature. |
Attributes:
Name | Type | Description |
---|---|---|
categories |
list[str | int | bool]
|
|
as_exposed |
ExposedCategoricalFeature
|
CategoricalFeature as ExposedCategoricalFeature. |
MultivariateNumericalFeature
#
MultivariateNumericalFeature feature.
It represents numerical data points divided into several channels. Oppositely as time serie features, there is no time relationship between points here.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
int
|
Number of channels |
required |
|
List[str] | None
|
List of channel names, optional. |
None.
|
Methods:
Name | Description |
---|---|
from_exposed |
MultivariateNumericalFeature from ExposedMultivariateNumericalFeature. |
Attributes:
Name | Type | Description |
---|---|---|
size |
int
|
|
channel_names |
list[str] | None
|
|
as_exposed |
ExposedMultivariateNumericalFeature
|
MultivariateNumericalFeature as ExposedMultivariateNumericalFeature. |
size: int = field(kw_only=True)
#
channel_names: list[str] | None = field(default=None, kw_only=True)
#
as_exposed: ExposedMultivariateNumericalFeature
#
MultivariateNumericalFeature as ExposedMultivariateNumericalFeature.
from_exposed(exposed_feature: ExposedMultivariateNumericalFeature) -> Self
#
MultivariateNumericalFeature from ExposedMultivariateNumericalFeature.
Source code in src/xpdeep/dataset/schema/feature/feature.py
UnivariateSynchronousTimeSerie
#
UnivariateSynchronousTimeSerie feature.
It represents a time serie with a single channel, already synchronized (no dynamic time warping required).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
int
|
The size of the time series. This typically refers to the number of time points or observations in the time series. |
required |
|
str | None
|
Used in XpViz. Indeed, if the same channel is used for both input (as a lookback, under a first feature object) and target (as a horizon to predict, under a second feature object), this parameter may be specified to visualize on the same curve both features, (the lookback and its corresponding horizon). |
None.
|
Methods:
Name | Description |
---|---|
from_exposed |
UnivariateSynchronousTimeSerie from ExposedUnivariateSynchronousTimeSerie. |
Attributes:
Name | Type | Description |
---|---|---|
size |
int
|
|
mirrored_channel |
str | None
|
|
as_exposed |
ExposedUnivariateSynchronousTimeSerie
|
UnivariateSynchronousTimeSerie as ExposedUnivariateSynchronousTimeSerie. |
size: int = field(kw_only=True)
#
mirrored_channel: str | None = field(default=None, kw_only=True)
#
as_exposed: ExposedUnivariateSynchronousTimeSerie
#
UnivariateSynchronousTimeSerie as ExposedUnivariateSynchronousTimeSerie.
from_exposed(exposed_feature: ExposedUnivariateSynchronousTimeSerie) -> Self
#
UnivariateSynchronousTimeSerie from ExposedUnivariateSynchronousTimeSerie.
Source code in src/xpdeep/dataset/schema/feature/feature.py
UnivariateAsynchronousTimeSerie
#
UnivariateAsynchronousTimeSerie feature.
This class represents a univariate time series that is not synchronized, meaning that it does require Dynamic Time Warping (DTW). The DTW will be applied automatically if this feature is chosen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
int
|
The size of the time series. This typically refers to the number of time points or observations in the time series. |
required |
|
str | None
|
Used in XpViz. Indeed, if the same channel is used for both input (as a lookback, under a first feature object) and target (as a horizon to predict, under a second feature object), this parameter may be specified to visualize on the same curve both features, (the lookback and its corresponding horizon). |
None.
|
Methods:
Name | Description |
---|---|
from_exposed |
UnivariateAsynchronousTimeSerie from ExposedUnivariateAsynchronousTimeSerie. |
Attributes:
Name | Type | Description |
---|---|---|
size |
int
|
|
mirrored_channel |
str | None
|
|
as_exposed |
ExposedUnivariateAsynchronousTimeSerie
|
UnivariateAsynchronousTimeSerie as ExposedUnivariateAsynchronousTimeSerie. |
size: int = field(kw_only=True)
#
mirrored_channel: str | None = field(default=None, kw_only=True)
#
as_exposed: ExposedUnivariateAsynchronousTimeSerie
#
UnivariateAsynchronousTimeSerie as ExposedUnivariateAsynchronousTimeSerie.
from_exposed(exposed_feature: ExposedUnivariateAsynchronousTimeSerie) -> Self
#
UnivariateAsynchronousTimeSerie from ExposedUnivariateAsynchronousTimeSerie.
Source code in src/xpdeep/dataset/schema/feature/feature.py
MultivariateSynchronousTimeSerie
#
MultivariateSynchronousTimeSerie feature.
This class represents a multivariate time series (multiple channels), already synchronized (no dynamic time warping required).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
tuple
|
Sequence_length x Number of channels |
required |
|
List[str] | None
|
List of channel names, optional. |
None.
|
Methods:
Name | Description |
---|---|
from_exposed |
MultivariateSynchronousTimeSerie from ExposedMultivariateSynchronousTimeSerie. |
Attributes:
Name | Type | Description |
---|---|---|
size |
list[int]
|
|
channel_names |
str | None
|
|
as_exposed |
ExposedMultivariateSynchronousTimeSerie
|
MultivariateSynchronousTimeSerie as ExposedMultivariateSynchronousTimeSerie. |
size: list[int] = field(kw_only=True)
#
channel_names: str | None = field(default=None, kw_only=True)
#
as_exposed: ExposedMultivariateSynchronousTimeSerie
#
MultivariateSynchronousTimeSerie as ExposedMultivariateSynchronousTimeSerie.
from_exposed(exposed_feature: ExposedMultivariateSynchronousTimeSerie) -> Self
#
MultivariateSynchronousTimeSerie from ExposedMultivariateSynchronousTimeSerie.
Source code in src/xpdeep/dataset/schema/feature/feature.py
MultivariateAsynchronousTimeSerie
#
MultivariateAsynchronousTimeSerie feature.
This class represents a multivariate time series (multiple channels), that is not synchronized, meaning that it does require Dynamic Time Warping (DTW). The DTW will be applied automatically if this feature is chosen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
tuple
|
Sequence_length x Number of channels |
required |
|
List[str] | None
|
List of channel names, optional. |
None.
|
Methods:
Name | Description |
---|---|
from_exposed |
MultivariateAsynchronousTimeSerie from ExposedMultivariateAsynchronousTimeSerie. |
Attributes:
Name | Type | Description |
---|---|---|
size |
list[int]
|
|
channel_names |
list[str] | None
|
|
as_exposed |
ExposedMultivariateAsynchronousTimeSerie
|
MultivariateAsynchronousTimeSerie as ExposedMultivariateAsynchronousTimeSerie. |
size: list[int] = field(kw_only=True)
#
channel_names: list[str] | None = field(default=None, kw_only=True)
#
as_exposed: ExposedMultivariateAsynchronousTimeSerie
#
MultivariateAsynchronousTimeSerie as ExposedMultivariateAsynchronousTimeSerie.
from_exposed(exposed_feature: ExposedMultivariateAsynchronousTimeSerie) -> Self
#
MultivariateAsynchronousTimeSerie from ExposedMultivariateAsynchronousTimeSerie.
Source code in src/xpdeep/dataset/schema/feature/feature.py
Metadata
#
Metadata.
Represents a metadata, for instance the "index_xp_deep" metadata, cf doc dataset/concept.
Methods:
Name | Description |
---|---|
from_exposed |
Create Metadata from exposed metadata. |
Attributes:
Name | Type | Description |
---|---|---|
as_exposed |
ExposedMetadata
|
Generate the corresponding exposed feature. |