Class: Google::Cloud::AutoML::V1beta1::PredictResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/automl/v1beta1/prediction_service.rb

Overview

Response message for PredictionService.Predict.

Defined Under Namespace

Classes: MetadataEntry

Instance Attribute Summary collapse

Instance Attribute Details

#metadata::Google::Protobuf::Map{::String => ::String}

Returns 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.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    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.



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'proto_docs/google/cloud/automl/v1beta1/prediction_service.rb', line 97

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#payload::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>

Returns Prediction result. Translation and Text Sentiment will return precisely one payload.

Returns:



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'proto_docs/google/cloud/automl/v1beta1/prediction_service.rb', line 97

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#preprocessed_input::Google::Cloud::AutoML::V1beta1::ExamplePayload

Returns 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.

Returns:



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'proto_docs/google/cloud/automl/v1beta1/prediction_service.rb', line 97

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end