# Class FeatureMap (0.13.1)

0.13.1 (latest) 0.13.0 0.12.0 0.11.0 0.10.18 0.9.0 0.8.2 0.7.1 0.6.2 0.5.1 0.4.0 0.3.3 0.2.2 0.1.0

    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, https://docs.cloud.google.com/python/docs/reference/recommendationengine/latest/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, https://docs.cloud.google.com/python/docs/reference/recommendationengine/latest/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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` 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 `mapping` is a mapping type or there are keyword parameters. |

### 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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` 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 `mapping` is a mapping type or there are keyword parameters. |

### StringList

    StringList(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A list of string features.