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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
CATEGORICAL_FEATURES_FIELD_NUMBER
public static final int CATEGORICAL_FEATURES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NUMERICAL_FEATURES_FIELD_NUMBER
public static final int NUMERICAL_FEATURES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static FeatureMap getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static FeatureMap.Builder newBuilder()
newBuilder(FeatureMap prototype)
public static FeatureMap.Builder newBuilder(FeatureMap prototype)
public static FeatureMap parseDelimitedFrom(InputStream input)
public static FeatureMap parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static FeatureMap parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static FeatureMap parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(CodedInputStream input)
public static FeatureMap parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(InputStream input)
public static FeatureMap parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static FeatureMap parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static FeatureMap parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<FeatureMap> parser()
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 |
---|
Name | Description |
key | String
|
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 |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getCategoricalFeatures()
public Map<String,FeatureMap.StringList> getCategoricalFeatures()
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 |
---|
Type | Description |
int | |
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;
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;
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 |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public FeatureMap getDefaultInstanceForType()
getNumericalFeatures()
public Map<String,FeatureMap.FloatList> getNumericalFeatures()
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 |
---|
Type | Description |
int | |
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;
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;
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 |
---|
Name | Description |
key | String
|
getParserForType()
public Parser<FeatureMap> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public FeatureMap.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected FeatureMap.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public FeatureMap.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides