Google Cloud Ai Platform V1 Client - Class Neighbor (0.39.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Neighbor.

A neighbor of the query vector.

Generated from protobuf message google.cloud.aiplatform.v1.NearestNeighbors.Neighbor

Namespace

Google \ Cloud \ AIPlatform \ V1 \ NearestNeighbors

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ entity_id string

The id of the similar entity.

↳ distance float

The distance between the neighbor and the query vector.

↳ entity_key_values Google\Cloud\AIPlatform\V1\FetchFeatureValuesResponse

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

getEntityId

The id of the similar entity.

Returns
Type Description
string

setEntityId

The id of the similar entity.

Parameter
Name Description
var string
Returns
Type Description
$this

getDistance

The distance between the neighbor and the query vector.

Returns
Type Description
float

setDistance

The distance between the neighbor and the query vector.

Parameter
Name Description
var float
Returns
Type Description
$this

getEntityKeyValues

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

Returns
Type Description
Google\Cloud\AIPlatform\V1\FetchFeatureValuesResponse|null

hasEntityKeyValues

clearEntityKeyValues

setEntityKeyValues

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

Parameter
Name Description
var Google\Cloud\AIPlatform\V1\FetchFeatureValuesResponse
Returns
Type Description
$this