public sealed class FeatureMap : IMessage<FeatureMap>, IEquatable<FeatureMap>, IDeepCloneable<FeatureMap>, IBufferMessage, IMessage
Reference documentation and code samples for the Recommendations AI v1beta1 API class FeatureMap.
FeatureMap represents extra features that customers want to include in the
recommendation model for catalogs/user events as categorical/numerical
features.
public MapField<string, FeatureMap.Types.StringList> CategoricalFeatures { get; }
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"]}
[[["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-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eFeatureMap\u003c/code\u003e class in the Google Cloud Recommendation Engine v1beta1 API allows for the inclusion of extra features in recommendation models for catalogs and user events.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFeatureMap\u003c/code\u003e supports both categorical and numerical features, enabling the representation of data like product brand, customer country, product dimensions, or customer age.\u003c/p\u003e\n"],["\u003cp\u003eThe class is implemented as part of a hierarchy that inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFeatureMap\u003c/code\u003e includes properties for \u003ccode\u003eCategoricalFeatures\u003c/code\u003e, which are stored in a map of string keys to \u003ccode\u003eStringList\u003c/code\u003e values, and \u003ccode\u003eNumericalFeatures\u003c/code\u003e, stored as a map of string keys to \u003ccode\u003eFloatList\u003c/code\u003e values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFeatureMap\u003c/code\u003e class offers two constructors: a default constructor \u003ccode\u003eFeatureMap()\u003c/code\u003e and an overload \u003ccode\u003eFeatureMap(FeatureMap other)\u003c/code\u003e that clones an existing \u003ccode\u003eFeatureMap\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,[]]