Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1NearestNeighborsNeighbor

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) ⇒ GoogleCloudAiplatformV1NearestNeighborsNeighbor

Returns a new instance of GoogleCloudAiplatformV1NearestNeighborsNeighbor.



15820
15821
15822
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15820

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

Instance Attribute Details

#distanceFloat

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

Returns:

  • (Float)


15808
15809
15810
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15808

def distance
  @distance
end

#entity_idString

The id of the similar entity. Corresponds to the JSON property entityId

Returns:

  • (String)


15813
15814
15815
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15813

def entity_id
  @entity_id
end

#entity_key_valuesGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1FetchFeatureValuesResponse

Response message for FeatureOnlineStoreService.FetchFeatureValues Corresponds to the JSON property entityKeyValues



15818
15819
15820
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15818

def entity_key_values
  @entity_key_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15825
15826
15827
15828
15829
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15825

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