Class: Google::Cloud::AIPlatform::V1::NearestNeighborQuery
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::NearestNeighborQuery
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb
Overview
A query to find a number of similar entities.
Defined Under Namespace
Classes: Embedding, Parameters, StringFilter
Instance Attribute Summary collapse
-
#embedding ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
Optional.
-
#entity_id ⇒ ::String
Optional.
-
#neighbor_count ⇒ ::Integer
Optional.
-
#parameters ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
Optional.
-
#per_crowding_attribute_neighbor_count ⇒ ::Integer
Optional.
-
#string_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
Optional.
Instance Attribute Details
#embedding ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
Returns Optional. The embedding vector that be used for similar search.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#entity_id ⇒ ::String
Returns Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#neighbor_count ⇒ ::Integer
Returns Optional. The number of similar entities to be retrieved from feature view for each query.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#parameters ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
Returns Optional. Parameters that can be set to tune query on the fly.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#per_crowding_attribute_neighbor_count ⇒ ::Integer
Returns Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#string_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
Returns Optional. The list of string filters.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 132 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |