public static final class FeatureMap.Builder extends GeneratedMessageV3.Builder<FeatureMap.Builder> 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 Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public FeatureMap.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public FeatureMap build()
Returns
buildPartial()
public FeatureMap buildPartial()
Returns
clear()
public FeatureMap.Builder clear()
Returns
Overrides
clearCategoricalFeatures()
public FeatureMap.Builder clearCategoricalFeatures()
Returns
clearField(Descriptors.FieldDescriptor field)
public FeatureMap.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearNumericalFeatures()
public FeatureMap.Builder clearNumericalFeatures()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public FeatureMap.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public FeatureMap.Builder clone()
Returns
Overrides
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
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
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMutableCategoricalFeatures()
public Map<String,FeatureMap.StringList> getMutableCategoricalFeatures()
Use alternate mutation accessors instead.
Returns
getMutableNumericalFeatures()
public Map<String,FeatureMap.FloatList> getMutableNumericalFeatures()
Use alternate mutation accessors instead.
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(FeatureMap other)
public FeatureMap.Builder mergeFrom(FeatureMap other)
Parameter
Returns
public FeatureMap.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public FeatureMap.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final FeatureMap.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllCategoricalFeatures(Map<String,FeatureMap.StringList> values)
public FeatureMap.Builder putAllCategoricalFeatures(Map<String,FeatureMap.StringList> values)
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
putAllNumericalFeatures(Map<String,FeatureMap.FloatList> values)
public FeatureMap.Builder putAllNumericalFeatures(Map<String,FeatureMap.FloatList> values)
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
putCategoricalFeatures(String key, FeatureMap.StringList value)
public FeatureMap.Builder putCategoricalFeatures(String key, FeatureMap.StringList value)
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
putNumericalFeatures(String key, FeatureMap.FloatList value)
public FeatureMap.Builder putNumericalFeatures(String key, FeatureMap.FloatList value)
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
removeCategoricalFeatures(String key)
public FeatureMap.Builder removeCategoricalFeatures(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
removeNumericalFeatures(String key)
public FeatureMap.Builder removeNumericalFeatures(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
setField(Descriptors.FieldDescriptor field, Object value)
public FeatureMap.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public FeatureMap.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final FeatureMap.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides