Class: Google::Apis::LanguageV1beta2::XpsConfusionMatrix
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta2::XpsConfusionMatrix
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v1beta2/classes.rb,
lib/google/apis/language_v1beta2/representations.rb,
lib/google/apis/language_v1beta2/representations.rb
Overview
Confusion matrix of the model running the classification.
Instance Attribute Summary collapse
-
#annotation_spec_id_token ⇒ Array<String>
For the following three repeated fields, only one is intended to be set.
-
#category ⇒ Array<Fixnum>
Category (mainly for segmentation).
-
#row ⇒ Array<Google::Apis::LanguageV1beta2::XpsConfusionMatrixRow>
Rows in the confusion matrix.
-
#sentiment_label ⇒ Array<Fixnum>
Sentiment labels used in the confusion matrix.
Instance Method Summary collapse
-
#initialize(**args) ⇒ XpsConfusionMatrix
constructor
A new instance of XpsConfusionMatrix.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ XpsConfusionMatrix
Returns a new instance of XpsConfusionMatrix.
1917 1918 1919 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1917 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotation_spec_id_token ⇒ Array<String>
For the following three repeated fields, only one is intended to be set.
annotation_spec_id_token is preferable to be set. ID tokens of the annotation
specs used in the confusion matrix.
Corresponds to the JSON property annotationSpecIdToken
1894 1895 1896 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1894 def annotation_spec_id_token @annotation_spec_id_token end |
#category ⇒ Array<Fixnum>
Category (mainly for segmentation). Set only for image segmentation models.
Note: uCAIP Image Segmentation should use annotation_spec_id_token.
Corresponds to the JSON property category
1900 1901 1902 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1900 def category @category end |
#row ⇒ Array<Google::Apis::LanguageV1beta2::XpsConfusionMatrixRow>
Rows in the confusion matrix. The number of rows is equal to the size of
annotation_spec_id_token
. row[i].value[j]
is the number of examples that
have ground truth of the annotation_spec_id_token[i]
and are predicted as
annotation_spec_id_token[j]
by the model being evaluated.
Corresponds to the JSON property row
1908 1909 1910 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1908 def row @row end |
#sentiment_label ⇒ Array<Fixnum>
Sentiment labels used in the confusion matrix. Set only for text sentiment
models. For AutoML Text Revamp, use annotation_spec_id_token
instead and
leave this field empty.
Corresponds to the JSON property sentimentLabel
1915 1916 1917 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1915 def sentiment_label @sentiment_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1922 1923 1924 1925 1926 1927 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1922 def update!(**args) @annotation_spec_id_token = args[:annotation_spec_id_token] if args.key?(:annotation_spec_id_token) @category = args[:category] if args.key?(:category) @row = args[:row] if args.key?(:row) @sentiment_label = args[:sentiment_label] if args.key?(:sentiment_label) end |