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.
1909 1910 1911 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1909 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
1886 1887 1888 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1886 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
1892 1893 1894 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1892 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
1900 1901 1902 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1900 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
1907 1908 1909 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1907 def sentiment_label @sentiment_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1914 1915 1916 1917 1918 1919 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1914 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 |