Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQuery
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQuery
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
A query to find a number of similar entities.
Instance Attribute Summary collapse
-
#embedding ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryEmbedding
The embedding vector.
-
#entity_id ⇒ String
Optional.
-
#neighbor_count ⇒ Fixnum
Optional.
-
#parameters ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters
Parameters that can be overrided in each query to tune query latency and recall.
-
#per_crowding_attribute_neighbor_count ⇒ Fixnum
Optional.
-
#string_filters ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryStringFilter>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1NearestNeighborQuery
constructor
A new instance of GoogleCloudAiplatformV1beta1NearestNeighborQuery.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1NearestNeighborQuery
Returns a new instance of GoogleCloudAiplatformV1beta1NearestNeighborQuery.
17487 17488 17489 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17487 def initialize(**args) update!(**args) end |
Instance Attribute Details
#embedding ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryEmbedding
The embedding vector.
Corresponds to the JSON property embedding
17454 17455 17456 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17454 def @embedding end |
#entity_id ⇒ String
Optional. The entity id whose similar entities should be searched for. If
embedding is set, search will use embedding instead of entity_id.
Corresponds to the JSON property entityId
17460 17461 17462 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17460 def entity_id @entity_id end |
#neighbor_count ⇒ Fixnum
Optional. The number of similar entities to be retrieved from feature view for
each query.
Corresponds to the JSON property neighborCount
17466 17467 17468 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17466 def neighbor_count @neighbor_count end |
#parameters ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters
Parameters that can be overrided in each query to tune query latency and
recall.
Corresponds to the JSON property parameters
17472 17473 17474 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17472 def parameters @parameters end |
#per_crowding_attribute_neighbor_count ⇒ Fixnum
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.
Corresponds to the JSON property perCrowdingAttributeNeighborCount
17480 17481 17482 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17480 def per_crowding_attribute_neighbor_count @per_crowding_attribute_neighbor_count end |
#string_filters ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1NearestNeighborQueryStringFilter>
Optional. The list of string filters.
Corresponds to the JSON property stringFilters
17485 17486 17487 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17485 def string_filters @string_filters end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
17492 17493 17494 17495 17496 17497 17498 17499 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 17492 def update!(**args) @embedding = args[:embedding] if args.key?(:embedding) @entity_id = args[:entity_id] if args.key?(:entity_id) @neighbor_count = args[:neighbor_count] if args.key?(:neighbor_count) @parameters = args[:parameters] if args.key?(:parameters) @per_crowding_attribute_neighbor_count = args[:per_crowding_attribute_neighbor_count] if args.key?(:per_crowding_attribute_neighbor_count) @string_filters = args[:string_filters] if args.key?(:string_filters) end |