Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FindNeighborsResponseNeighbor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1FindNeighborsResponseNeighbor

Returns a new instance of GoogleCloudAiplatformV1beta1FindNeighborsResponseNeighbor.



10553
10554
10555
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10553

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

Instance Attribute Details

#datapointGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1IndexDatapoint

A datapoint of Index. Corresponds to the JSON property datapoint



10541
10542
10543
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10541

def datapoint
  @datapoint
end

#distanceFloat

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

Returns:

  • (Float)


10546
10547
10548
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10546

def distance
  @distance
end

#sparse_distanceFloat

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

Returns:

  • (Float)


10551
10552
10553
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10551

def sparse_distance
  @sparse_distance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10558
10559
10560
10561
10562
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10558

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