Google Cloud Ai Platform V1 Client - Class SparseEmbedding (1.54.0)

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

Feature embedding vector for sparse index. An array of numbers whose values are located in the specified dimensions.

Generated from protobuf message google.cloud.aiplatform.v1.IndexDatapoint.SparseEmbedding

Namespace

Google \ Cloud \ AIPlatform \ V1 \ IndexDatapoint

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ values float[]

Required. The list of embedding values of the sparse vector.

↳ dimensions int[]|string[]

Required. The list of indexes for the embedding values of the sparse vector.

getValues

Required. The list of embedding values of the sparse vector.

Returns
Type Description
Google\Protobuf\RepeatedField<float>

setValues

Required. The list of embedding values of the sparse vector.

Parameter
Name Description
var float[]
Returns
Type Description
$this

getDimensions

Required. The list of indexes for the embedding values of the sparse vector.

Returns
Type Description
Google\Protobuf\RepeatedField<int>|Google\Protobuf\RepeatedField<string>

setDimensions

Required. The list of indexes for the embedding values of the sparse vector.

Parameter
Name Description
var int[]|string[]
Returns
Type Description
$this