Class: Google::Cloud::RecommendationEngine::V1beta1::FeatureMap

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/recommendationengine/v1beta1/common.rb

Overview

FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.

Defined Under Namespace

Classes: CategoricalFeaturesEntry, FloatList, NumericalFeaturesEntry, StringList

Instance Attribute Summary collapse

Instance Attribute Details

#categorical_features::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::StringList}

Returns 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"]}



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/common.rb', line 46

class FeatureMap
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A list of string features.
  # @!attribute [rw] value
  #   @return [::Array<::String>]
  #     String feature value with a length limit of 128 bytes.
  class StringList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of float features.
  # @!attribute [rw] value
  #   @return [::Array<::Float>]
  #     Float feature value.
  class FloatList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::StringList]
  class CategoricalFeaturesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList]
  class NumericalFeaturesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#numerical_features::Google::Protobuf::Map{::String => ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList}

Returns 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]} }



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/common.rb', line 46

class FeatureMap
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A list of string features.
  # @!attribute [rw] value
  #   @return [::Array<::String>]
  #     String feature value with a length limit of 128 bytes.
  class StringList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of float features.
  # @!attribute [rw] value
  #   @return [::Array<::Float>]
  #     Float feature value.
  class FloatList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::StringList]
  class CategoricalFeaturesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap::FloatList]
  class NumericalFeaturesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end