Cloud AutoML V1 Client - Class PredictResponse (1.5.4)

Reference documentation and code samples for the Cloud AutoML V1 Client class PredictResponse.

Response message for PredictionService.Predict.

Generated from protobuf message google.cloud.automl.v1.PredictResponse

Namespace

Google \ Cloud \ AutoMl \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ payload array<Google\Cloud\AutoMl\V1\AnnotationPayload>

Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.

↳ preprocessed_input Google\Cloud\AutoMl\V1\ExamplePayload

The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the document_text property.

↳ metadata array|Google\Protobuf\Internal\MapField

Additional domain-specific prediction response metadata. AutoML Vision Object Detection max_bounding_box_count : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis sentiment_score : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). sentiment_score is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.

getPayload

Prediction result.

AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPayload

Prediction result.

AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.

Parameter
NameDescription
var array<Google\Cloud\AutoMl\V1\AnnotationPayload>
Returns
TypeDescription
$this

getPreprocessedInput

The preprocessed example that AutoML actually makes prediction on.

Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the document_text property.

Returns
TypeDescription
Google\Cloud\AutoMl\V1\ExamplePayload|null

hasPreprocessedInput

clearPreprocessedInput

setPreprocessedInput

The preprocessed example that AutoML actually makes prediction on.

Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the document_text property.

Parameter
NameDescription
var Google\Cloud\AutoMl\V1\ExamplePayload
Returns
TypeDescription
$this

getMetadata

Additional domain-specific prediction response metadata.

AutoML Vision Object Detection max_bounding_box_count : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis sentiment_score : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). sentiment_score is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMetadata

Additional domain-specific prediction response metadata.

AutoML Vision Object Detection max_bounding_box_count : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis sentiment_score : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). sentiment_score is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this