Class PredictResponse (2.1.0)

PredictResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response message for PredictionService.Predict.

Attributes

NameDescription
payload Sequence[.annotation_payload.AnnotationPayload]
Prediction result. Translation and Text Sentiment will return precisely one payload.
preprocessed_input .data_items.ExamplePayload
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. - For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in document_text.
metadata Sequence[.prediction_service.PredictResponse.MetadataEntry]
Additional domain-specific prediction response metadata. - For Image Object Detection: max_bounding_box_count - (int64) At most that many bounding boxes per image could have been returned. - For Text Sentiment: 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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.

Classes

MetadataEntry

MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.