Class: Google::Apis::LanguageV1::XpsConfusionMatrix
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1::XpsConfusionMatrix
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v1/classes.rb,
lib/google/apis/language_v1/representations.rb,
lib/google/apis/language_v1/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::LanguageV1::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.
1897 1898 1899 |
# File 'lib/google/apis/language_v1/classes.rb', line 1897 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
1874 1875 1876 |
# File 'lib/google/apis/language_v1/classes.rb', line 1874 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
1880 1881 1882 |
# File 'lib/google/apis/language_v1/classes.rb', line 1880 def category @category end |
#row ⇒ Array<Google::Apis::LanguageV1::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
1888 1889 1890 |
# File 'lib/google/apis/language_v1/classes.rb', line 1888 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
1895 1896 1897 |
# File 'lib/google/apis/language_v1/classes.rb', line 1895 def sentiment_label @sentiment_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1902 1903 1904 1905 1906 1907 |
# File 'lib/google/apis/language_v1/classes.rb', line 1902 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 |