Reference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::FeatureMap.
FeatureMap represents extra features that customers want to include in the
recommendation model for catalogs/user events as categorical/numerical
features.
(::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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"]}
value (::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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"]}
Returns
(::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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"]}
(::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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]} }
value (::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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]} }
Returns
(::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::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]} }
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::FeatureMap (v0.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.0 (latest)](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.12.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.12.1/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.11.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.11.0/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.10.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.10.0/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.9.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.9.2/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.8.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.8.2/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.7.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.7.0/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.6.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.6.1/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.5.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.5.0/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.4.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.4.1/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)\n- [0.3.7](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.3.7/Google-Cloud-RecommendationEngine-V1beta1-FeatureMap) \nReference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::FeatureMap.\n\nFeatureMap represents extra features that customers want to include in the\nrecommendation model for catalogs/user events as categorical/numerical\nfeatures. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #categorical_features\n\n def categorical_features() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::StringList}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::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.\n\n Feature names and values must be UTF-8 encoded strings.\n\n For example: `{ \"colors\": {\"value\": [\"yellow\", \"green\"]},\n \"sizes\": \\\\{\"value\":[\"S\", \"M\"]}`\n\n### #categorical_features=\n\n def categorical_features=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::StringList}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::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.\n\n\n Feature names and values must be UTF-8 encoded strings.\n\n For example: `{ \"colors\": {\"value\": [\"yellow\", \"green\"]},\n\"sizes\": \\\\{\"value\":[\"S\", \"M\"]}` \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::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.\n\n Feature names and values must be UTF-8 encoded strings.\n\n For example: `{ \"colors\": {\"value\": [\"yellow\", \"green\"]},\n \"sizes\": \\\\{\"value\":[\"S\", \"M\"]}`\n\n### #numerical_features\n\n def numerical_features() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}) --- Numerical features. Some examples would be the height/weight of a product, or age of a customer.\n\n Feature names must be UTF-8 encoded strings.\n\n For example: `{ \"lengths_cm\": {\"value\":[2.3, 15.4]},\n \"heights_cm\": \\\\{\"value\":[8.1, 6.4]} }`\n\n### #numerical_features=\n\n def numerical_features=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}) --- Numerical features. Some examples would be the height/weight of a product, or age of a customer.\n\n\n Feature names must be UTF-8 encoded strings.\n\n For example: `{ \"lengths_cm\": {\"value\":[2.3, 15.4]},\n\"heights_cm\": \\\\{\"value\":[8.1, 6.4]} }` \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}) --- Numerical features. Some examples would be the height/weight of a product, or age of a customer.\n\n Feature names must be UTF-8 encoded strings.\n\n For example: `{ \"lengths_cm\": {\"value\":[2.3, 15.4]},\n \"heights_cm\": \\\\{\"value\":[8.1, 6.4]} }`"]]