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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud AutoML V1beta1 API - Class Google::Cloud::AutoML::V1beta1::PredictResponse (v0.14.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.1 (latest)](/ruby/docs/reference/google-cloud-automl-v1beta1/latest/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.14.0](/ruby/docs/reference/google-cloud-automl-v1beta1/0.14.0/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.13.1](/ruby/docs/reference/google-cloud-automl-v1beta1/0.13.1/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.12.0](/ruby/docs/reference/google-cloud-automl-v1beta1/0.12.0/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.11.1](/ruby/docs/reference/google-cloud-automl-v1beta1/0.11.1/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.10.2](/ruby/docs/reference/google-cloud-automl-v1beta1/0.10.2/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.9.0](/ruby/docs/reference/google-cloud-automl-v1beta1/0.9.0/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.8.0](/ruby/docs/reference/google-cloud-automl-v1beta1/0.8.0/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.7.0](/ruby/docs/reference/google-cloud-automl-v1beta1/0.7.0/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.6.1](/ruby/docs/reference/google-cloud-automl-v1beta1/0.6.1/Google-Cloud-AutoML-V1beta1-PredictResponse)\n- [0.5.5](/ruby/docs/reference/google-cloud-automl-v1beta1/0.5.5/Google-Cloud-AutoML-V1beta1-PredictResponse) \nReference documentation and code samples for the Cloud AutoML V1beta1 API class Google::Cloud::AutoML::V1beta1::PredictResponse.\n\nResponse message for [PredictionService.Predict](/ruby/docs/reference/google-cloud-automl-v1beta1/latest/Google-Cloud-AutoML-V1beta1-PredictionService-Client#Google__Cloud__AutoML__V1beta1__PredictionService__Client_predict_instance_ \"Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict (method)\"). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #metadata\n\n def metadata() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Additional domain-specific prediction response metadata.\n\n - For Image Object Detection:\n `max_bounding_box_count` - (int64) At most that many bounding boxes per\n image could have been returned.\n\n - For Text Sentiment:\n `sentiment_score` - (float, deprecated) A value between -1 and 1,\n -1 maps to least positive sentiment, while 1 maps to the most positive\n one and the higher the score, the more positive the sentiment in the\n document is. Yet these values are relative to the training data, so\n e.g. if all data was positive then -1 will be also positive (though\n the least).\n The sentiment_score shouldn't be confused with \"score\" or \"magnitude\"\n from the previous Natural Language Sentiment Analysis API.\n\n### #metadata=\n\n def metadata=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) ---\n\n Additional domain-specific prediction response metadata.\n - For Image Object Detection:\n `max_bounding_box_count` - (int64) At most that many bounding boxes per\n image could have been returned.\n\n - For Text Sentiment:\n `sentiment_score` - (float, deprecated) A value between -1 and 1,\n -1 maps to least positive sentiment, while 1 maps to the most positive\n one and the higher the score, the more positive the sentiment in the\n document is. Yet these values are relative to the training data, so\n e.g. if all data was positive then -1 will be also positive (though\n the least).\n The sentiment_score shouldn't be confused with \"score\" or \"magnitude\"\n from the previous Natural Language Sentiment Analysis API.\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Additional domain-specific prediction response metadata.\n\n - For Image Object Detection:\n `max_bounding_box_count` - (int64) At most that many bounding boxes per\n image could have been returned.\n\n - For Text Sentiment:\n `sentiment_score` - (float, deprecated) A value between -1 and 1,\n -1 maps to least positive sentiment, while 1 maps to the most positive\n one and the higher the score, the more positive the sentiment in the\n document is. Yet these values are relative to the training data, so\n e.g. if all data was positive then -1 will be also positive (though\n the least).\n The sentiment_score shouldn't be confused with \"score\" or \"magnitude\"\n from the previous Natural Language Sentiment Analysis API.\n\n### #payload\n\n def payload() -\u003e ::Array\u003c::Google::Cloud::AutoML::V1beta1::AnnotationPayload\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::AutoML::V1beta1::AnnotationPayload](./Google-Cloud-AutoML-V1beta1-AnnotationPayload)\\\u003e) --- Prediction result. Translation and Text Sentiment will return precisely one payload.\n\n### #payload=\n\n def payload=(value) -\u003e ::Array\u003c::Google::Cloud::AutoML::V1beta1::AnnotationPayload\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::AutoML::V1beta1::AnnotationPayload](./Google-Cloud-AutoML-V1beta1-AnnotationPayload)\\\u003e) --- Prediction result. Translation and Text Sentiment will return precisely one payload. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::AutoML::V1beta1::AnnotationPayload](./Google-Cloud-AutoML-V1beta1-AnnotationPayload)\\\u003e) --- Prediction result. Translation and Text Sentiment will return precisely one payload.\n\n### #preprocessed_input\n\n def preprocessed_input() -\u003e ::Google::Cloud::AutoML::V1beta1::ExamplePayload\n\n**Returns**\n\n- ([::Google::Cloud::AutoML::V1beta1::ExamplePayload](./Google-Cloud-AutoML-V1beta1-ExamplePayload)) ---\n\n The preprocessed example that AutoML actually makes prediction on.\n Empty if AutoML does not preprocess the input example.\n - For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text](/ruby/docs/reference/google-cloud-automl-v1beta1/latest/Google-Cloud-AutoML-V1beta1-Document#Google__Cloud__AutoML__V1beta1__Document_document_text_instance_ \"Google::Cloud::AutoML::V1beta1::Document#document_text (method)\").\n\n### #preprocessed_input=\n\n def preprocessed_input=(value) -\u003e ::Google::Cloud::AutoML::V1beta1::ExamplePayload\n\n**Parameter**\n\n- **value** ([::Google::Cloud::AutoML::V1beta1::ExamplePayload](./Google-Cloud-AutoML-V1beta1-ExamplePayload)) ---\n\n The preprocessed example that AutoML actually makes prediction on.\n Empty if AutoML does not preprocess the input example.\n- For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text](/ruby/docs/reference/google-cloud-automl-v1beta1/latest/Google-Cloud-AutoML-V1beta1-Document#Google__Cloud__AutoML__V1beta1__Document_document_text_instance_ \"Google::Cloud::AutoML::V1beta1::Document#document_text (method)\"). \n**Returns**\n\n- ([::Google::Cloud::AutoML::V1beta1::ExamplePayload](./Google-Cloud-AutoML-V1beta1-ExamplePayload)) ---\n\n The preprocessed example that AutoML actually makes prediction on.\n Empty if AutoML does not preprocess the input example.\n - For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text](/ruby/docs/reference/google-cloud-automl-v1beta1/latest/Google-Cloud-AutoML-V1beta1-Document#Google__Cloud__AutoML__V1beta1__Document_document_text_instance_ \"Google::Cloud::AutoML::V1beta1::Document#document_text (method)\")."]]