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.



10940
10941
10942
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10940

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

Instance Attribute Details

#datapointGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1IndexDatapoint

A datapoint of Index. Corresponds to the JSON property datapoint



10928
10929
10930
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10928

def datapoint
  @datapoint
end

#distanceFloat

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

Returns:

  • (Float)


10933
10934
10935
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10933

def distance
  @distance
end

#sparse_distanceFloat

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

Returns:

  • (Float)


10938
10939
10940
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10938

def sparse_distance
  @sparse_distance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10945
10946
10947
10948
10949
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10945

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