Cloud AI Platform v1beta1 API - Class NearestNeighborQuery (1.0.0-beta04)

public sealed class NearestNeighborQuery : IMessage<NearestNeighborQuery>, IEquatable<NearestNeighborQuery>, IDeepCloneable<NearestNeighborQuery>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud AI Platform v1beta1 API class NearestNeighborQuery.

A query to find a number of similar entities.

Inheritance

object > NearestNeighborQuery

Namespace

Google.Cloud.AIPlatform.V1Beta1

Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

Constructors

NearestNeighborQuery()

public NearestNeighborQuery()

NearestNeighborQuery(NearestNeighborQuery)

public NearestNeighborQuery(NearestNeighborQuery other)
Parameter
Name Description
other NearestNeighborQuery

Properties

Embedding

public NearestNeighborQuery.Types.Embedding Embedding { get; set; }

Optional. The embedding vector that be used for similar search.

Property Value
Type Description
NearestNeighborQueryTypesEmbedding

EntityId

public string EntityId { get; set; }

Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.

Property Value
Type Description
string

HasEntityId

public bool HasEntityId { get; }

Gets whether the "entity_id" field is set

Property Value
Type Description
bool

InstanceCase

public NearestNeighborQuery.InstanceOneofCase InstanceCase { get; }
Property Value
Type Description
NearestNeighborQueryInstanceOneofCase

NeighborCount

public int NeighborCount { get; set; }

Optional. The number of similar entities to be retrieved from feature view for each query.

Property Value
Type Description
int

NumericFilters

public RepeatedField<NearestNeighborQuery.Types.NumericFilter> NumericFilters { get; }

Optional. The list of numeric filters.

Property Value
Type Description
RepeatedFieldNearestNeighborQueryTypesNumericFilter

Parameters

public NearestNeighborQuery.Types.Parameters Parameters { get; set; }

Optional. Parameters that can be set to tune query on the fly.

Property Value
Type Description
NearestNeighborQueryTypesParameters

PerCrowdingAttributeNeighborCount

public int PerCrowdingAttributeNeighborCount { get; set; }

Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.

Property Value
Type Description
int

StringFilters

public RepeatedField<NearestNeighborQuery.Types.StringFilter> StringFilters { get; }

Optional. The list of string filters.

Property Value
Type Description
RepeatedFieldNearestNeighborQueryTypesStringFilter