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

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

Namespace

Google \ Cloud \ RecommendationEngine \ V1beta1 \ PredictResponse

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
string

setId

ID of the recommended catalog item

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this