public final class FeatureMap extends GeneratedMessageV3 implements FeatureMapOrBuilder
FeatureMap represents extra features that customers want to include in the
recommendation model for catalogs/user events as categorical/numerical
features.
Protobuf type google.cloud.recommendationengine.v1beta1.FeatureMap
Static Fields
CATEGORICAL_FEATURES_FIELD_NUMBER
public static final int CATEGORICAL_FEATURES_FIELD_NUMBER
Field Value
NUMERICAL_FEATURES_FIELD_NUMBER
public static final int NUMERICAL_FEATURES_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static FeatureMap getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static FeatureMap.Builder newBuilder()
Returns
newBuilder(FeatureMap prototype)
public static FeatureMap.Builder newBuilder(FeatureMap prototype)
Parameter
Returns
public static FeatureMap parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static FeatureMap parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static FeatureMap parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static FeatureMap parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static FeatureMap parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static FeatureMap parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static FeatureMap parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static FeatureMap parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static FeatureMap parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<FeatureMap> parser()
Returns
Methods
containsCategoricalFeatures(String key)
public boolean containsCategoricalFeatures(String key)
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"]}
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;
Parameter
Returns
containsNumericalFeatures(String key)
public boolean containsNumericalFeatures(String key)
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]} }
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCategoricalFeatures()
public Map<String,FeatureMap.StringList> getCategoricalFeatures()
Returns
getCategoricalFeaturesCount()
public int getCategoricalFeaturesCount()
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"]}
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;
Returns
getCategoricalFeaturesMap()
public Map<String,FeatureMap.StringList> getCategoricalFeaturesMap()
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"]}
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;
Returns
getCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue)
public FeatureMap.StringList getCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue)
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"]}
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;
Parameters
Returns
getCategoricalFeaturesOrThrow(String key)
public FeatureMap.StringList getCategoricalFeaturesOrThrow(String key)
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"]}
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;
Parameter
Returns
getDefaultInstanceForType()
public FeatureMap getDefaultInstanceForType()
Returns
getNumericalFeatures()
public Map<String,FeatureMap.FloatList> getNumericalFeatures()
Returns
getNumericalFeaturesCount()
public int getNumericalFeaturesCount()
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]} }
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;
Returns
getNumericalFeaturesMap()
public Map<String,FeatureMap.FloatList> getNumericalFeaturesMap()
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]} }
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;
Returns
getNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue)
public FeatureMap.FloatList getNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue)
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]} }
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;
Parameters
Returns
getNumericalFeaturesOrThrow(String key)
public FeatureMap.FloatList getNumericalFeaturesOrThrow(String key)
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]} }
map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;
Parameter
Returns
getParserForType()
public Parser<FeatureMap> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public FeatureMap.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected FeatureMap.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public FeatureMap.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions