FeatureMap(mapping=None, *, ignore_unknown_fields=False, **kwargs)
FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.
Attributes
Name | Description |
categorical_features |
MutableMapping[str, google.cloud.recommendationengine_v1beta1.types.FeatureMap.StringList]
Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: { "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}
|
numerical_features |
MutableMapping[str, google.cloud.recommendationengine_v1beta1.types.FeatureMap.FloatList]
Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: { "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }
|
Classes
CategoricalFeaturesEntry
CategoricalFeaturesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |
FloatList
FloatList(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A list of float features.
NumericalFeaturesEntry
NumericalFeaturesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |
StringList
StringList(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A list of string features.