Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FindNeighborsRequestQuery
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FindNeighborsRequestQuery
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
Overview
A query to find a number of the nearest neighbors (most similar vectors) of a vector.
Instance Attribute Summary collapse
-
#approximate_neighbor_count ⇒ Fixnum
The number of neighbors to find via approximate search before exact reordering is performed.
-
#datapoint ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1IndexDatapoint
A datapoint of Index.
-
#fraction_leaf_nodes_to_search_override ⇒ Float
The fraction of the number of leaves to search, set at query time allows user to tune search performance.
-
#neighbor_count ⇒ Fixnum
The number of nearest neighbors to be retrieved from database for each query.
-
#per_crowding_attribute_neighbor_count ⇒ Fixnum
Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute.
-
#rrf ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FindNeighborsRequestQueryRrf
Parameters for RRF algorithm that combines search results.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1FindNeighborsRequestQuery
constructor
A new instance of GoogleCloudAiplatformV1FindNeighborsRequestQuery.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1FindNeighborsRequestQuery
Returns a new instance of GoogleCloudAiplatformV1FindNeighborsRequestQuery.
8993 8994 8995 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8993 def initialize(**args) update!(**args) end |
Instance Attribute Details
#approximate_neighbor_count ⇒ Fixnum
The number of neighbors to find via approximate search before exact reordering
is performed. If not set, the default value from scam config is used; if set,
this value must be > 0.
Corresponds to the JSON property approximateNeighborCount
8955 8956 8957 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8955 def approximate_neighbor_count @approximate_neighbor_count end |
#datapoint ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1IndexDatapoint
A datapoint of Index.
Corresponds to the JSON property datapoint
8960 8961 8962 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8960 def datapoint @datapoint end |
#fraction_leaf_nodes_to_search_override ⇒ Float
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. If not set or
set to 0.0, query uses the default value specified in
NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
Corresponds to the JSON property fractionLeafNodesToSearchOverride
8969 8970 8971 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8969 def fraction_leaf_nodes_to_search_override @fraction_leaf_nodes_to_search_override end |
#neighbor_count ⇒ Fixnum
The number of nearest neighbors to be retrieved from database for each query.
If not set, will use the default from the service configuration (https://cloud.
google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-
search-config).
Corresponds to the JSON property neighborCount
8977 8978 8979 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8977 def neighbor_count @neighbor_count end |
#per_crowding_attribute_neighbor_count ⇒ Fixnum
Crowding is a constraint on a neighbor list produced by nearest neighbor
search requiring that no more than some value k' of the k neighbors returned
have the same value of crowding_attribute. It's used for improving result
diversity. This field is the maximum number of matches with the same crowding
tag.
Corresponds to the JSON property perCrowdingAttributeNeighborCount
8986 8987 8988 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8986 def per_crowding_attribute_neighbor_count @per_crowding_attribute_neighbor_count end |
#rrf ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FindNeighborsRequestQueryRrf
Parameters for RRF algorithm that combines search results.
Corresponds to the JSON property rrf
8991 8992 8993 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8991 def rrf @rrf end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8998 8999 9000 9001 9002 9003 9004 9005 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 8998 def update!(**args) @approximate_neighbor_count = args[:approximate_neighbor_count] if args.key?(:approximate_neighbor_count) @datapoint = args[:datapoint] if args.key?(:datapoint) @fraction_leaf_nodes_to_search_override = args[:fraction_leaf_nodes_to_search_override] if args.key?(:fraction_leaf_nodes_to_search_override) @neighbor_count = args[:neighbor_count] if args.key?(:neighbor_count) @per_crowding_attribute_neighbor_count = args[:per_crowding_attribute_neighbor_count] if args.key?(:per_crowding_attribute_neighbor_count) @rrf = args[:rrf] if args.key?(:rrf) end |