Class: Google::Apis::LanguageV1::XpsConfusionMatrixRow

Inherits:
Object
  • Object
show all
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

A row in the confusion matrix.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsConfusionMatrixRow

Returns a new instance of XpsConfusionMatrixRow.



1929
1930
1931
# File 'lib/google/apis/language_v1/classes.rb', line 1929

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#countArray<Fixnum>

Same as above except intended to represent other counts (for e.g. for segmentation this is pixel count). NOTE(params): Only example_count or count is set (oneoff does not support repeated fields unless they are embedded inside another message). Corresponds to the JSON property count

Returns:

  • (Array<Fixnum>)


1920
1921
1922
# File 'lib/google/apis/language_v1/classes.rb', line 1920

def count
  @count
end

#example_countArray<Fixnum>

Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id_token field. Corresponds to the JSON property exampleCount

Returns:

  • (Array<Fixnum>)


1927
1928
1929
# File 'lib/google/apis/language_v1/classes.rb', line 1927

def example_count
  @example_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1934
1935
1936
1937
# File 'lib/google/apis/language_v1/classes.rb', line 1934

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @example_count = args[:example_count] if args.key?(:example_count)
end