Google Cloud Recommendation Engine V1beta1 Client - Class PredictionResult (0.4.12)

Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class PredictionResult.

PredictionResult represents the recommendation prediction results.

Generated from protobuf message google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ id string

ID of the recommended catalog item

↳ item_metadata array|Google\Protobuf\Internal\MapField

Additional item metadata / annotations. Possible values: * catalogItem: JSON representation of the catalogItem. Will be set if returnCatalogItem is set to true in PredictRequest.params. * score: Prediction score in double value. Will be set if returnItemScore is set to true in PredictRequest.params.

getId

ID of the recommended catalog item

Returns
TypeDescription
string

setId

ID of the recommended catalog item

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getItemMetadata

Additional item metadata / annotations.

Possible values:

  • catalogItem: JSON representation of the catalogItem. Will be set if returnCatalogItem is set to true in PredictRequest.params.
  • score: Prediction score in double value. Will be set if returnItemScore is set to true in PredictRequest.params.
Returns
TypeDescription
Google\Protobuf\Internal\MapField

setItemMetadata

Additional item metadata / annotations.

Possible values:

  • catalogItem: JSON representation of the catalogItem. Will be set if returnCatalogItem is set to true in PredictRequest.params.
  • score: Prediction score in double value. Will be set if returnItemScore is set to true in PredictRequest.params.
Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this