Class PredictResponse (2.7.2)

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

Response message for PredictionService.Predict.

Attributes

NameDescription
payload Sequence[google.cloud.automl_v1.types.AnnotationPayload]
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
preprocessed_input google.cloud.automl_v1.types.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 Sequence[google.cloud.automl_v1.types.PredictResponse.MetadataEntry]
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.

Inheritance

builtins.object > proto.message.Message > PredictResponse

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.