Skip to content

numerical

Numerical feature types.

Classes:

Name Description
NumericalFeature

Numerical 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
to_model

Convert to NumericalFeatureType instance.

from_model

Instantiate from a json response.

Attributes:

Name Type Description
name Literal['NUMERICAL']

name: Literal['NUMERICAL'] = 'NUMERICAL' #

to_model() -> NumericalFeatureType #

Convert to NumericalFeatureType instance.

Source code in src/xpdeep/dataset/feature/feature_types/numerical.py
def to_model(self) -> NumericalFeatureType:
    """Convert to NumericalFeatureType instance."""
    return NumericalFeatureType(name=self.name)

from_model(feature_type_input: NumericalFeatureType) -> NumericalFeature #

Instantiate from a json response.

Source code in src/xpdeep/dataset/feature/feature_types/numerical.py
@staticmethod
def from_model(feature_type_input: NumericalFeatureType) -> NumericalFeature:  # noqa:ARG004
    """Instantiate from a json response."""
    return NumericalFeature()