Interpret prediction results from text sentiment analysis models (original) (raw)
Interpret prediction results from text sentiment analysis models
Stay organized with collections Save and categorize content based on your preferences.
After requesting a prediction, Vertex AI returns results based on your model's objective. Predictions from sentiment analysis models return the overall sentiment for a document. The sentiment is represented by an integer from 0 to the model's max sentiment score, which can be equal to or less than 10. The maximum sentiment value for a model is set during training. For example, if a model was trained on a dataset with a maximum sentiment score of 2, predicted sentiment scores can be 0 (negative), 1 (neutral), or 2 (positive).
Example batch prediction output
The following sample is the predicted result for a single document. Because the model's maximum sentiment score is 8, the predicted sentiment for this sample is clearly positive.
{ "instance": {"content": "gs://bucket/text.txt", "mimeType": "text/plain"}, "prediction": {"sentiment": 8} }
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-09 UTC.