Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FindNeighborsResponseNeighbor

Inherits:
Object
  • Object
show all
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 neighbor of the query vector.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1FindNeighborsResponseNeighbor

Returns a new instance of GoogleCloudAiplatformV1FindNeighborsResponseNeighbor.



9847
9848
9849
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9847

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#datapointGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1IndexDatapoint

A datapoint of Index. Corresponds to the JSON property datapoint



9835
9836
9837
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9835

def datapoint
  @datapoint
end

#distanceFloat

The distance between the neighbor and the dense embedding query. Corresponds to the JSON property distance

Returns:

  • (Float)


9840
9841
9842
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9840

def distance
  @distance
end

#sparse_distanceFloat

The distance between the neighbor and the query sparse_embedding. Corresponds to the JSON property sparseDistance

Returns:

  • (Float)


9845
9846
9847
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9845

def sparse_distance
  @sparse_distance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9852
9853
9854
9855
9856
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9852

def update!(**args)
  @datapoint = args[:datapoint] if args.key?(:datapoint)
  @distance = args[:distance] if args.key?(:distance)
  @sparse_distance = args[:sparse_distance] if args.key?(:sparse_distance)
end