Class: Google::Apis::LanguageV1::XpsTablesConfidenceMetricsEntry

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

Metrics for a single confidence threshold.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsTablesConfidenceMetricsEntry

Returns a new instance of XpsTablesConfidenceMetricsEntry.



3950
3951
3952
# File 'lib/google/apis/language_v1/classes.rb', line 3950

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

Instance Attribute Details

#confidence_thresholdFloat

The confidence threshold value used to compute the metrics. Corresponds to the JSON property confidenceThreshold

Returns:

  • (Float)


3902
3903
3904
# File 'lib/google/apis/language_v1/classes.rb', line 3902

def confidence_threshold
  @confidence_threshold
end

#f1_scoreFloat

The harmonic mean of recall and precision. (2 * precision * recall) / ( precision + recall) Corresponds to the JSON property f1Score

Returns:

  • (Float)


3908
3909
3910
# File 'lib/google/apis/language_v1/classes.rb', line 3908

def f1_score
  @f1_score
end

#false_negative_countFixnum

False negative count. Corresponds to the JSON property falseNegativeCount

Returns:

  • (Fixnum)


3913
3914
3915
# File 'lib/google/apis/language_v1/classes.rb', line 3913

def false_negative_count
  @false_negative_count
end

#false_positive_countFixnum

False positive count. Corresponds to the JSON property falsePositiveCount

Returns:

  • (Fixnum)


3918
3919
3920
# File 'lib/google/apis/language_v1/classes.rb', line 3918

def false_positive_count
  @false_positive_count
end

#false_positive_rateFloat

FPR = #false positives / (#false positives + #true negatives) Corresponds to the JSON property falsePositiveRate

Returns:

  • (Float)


3923
3924
3925
# File 'lib/google/apis/language_v1/classes.rb', line 3923

def false_positive_rate
  @false_positive_rate
end

#precisionFloat

Precision = #true positives / (#true positives + #false positives). Corresponds to the JSON property precision

Returns:

  • (Float)


3928
3929
3930
# File 'lib/google/apis/language_v1/classes.rb', line 3928

def precision
  @precision
end

#recallFloat

Recall = #true positives / (#true positives + #false negatives). Corresponds to the JSON property recall

Returns:

  • (Float)


3933
3934
3935
# File 'lib/google/apis/language_v1/classes.rb', line 3933

def recall
  @recall
end

#true_negative_countFixnum

True negative count. Corresponds to the JSON property trueNegativeCount

Returns:

  • (Fixnum)


3938
3939
3940
# File 'lib/google/apis/language_v1/classes.rb', line 3938

def true_negative_count
  @true_negative_count
end

#true_positive_countFixnum

True positive count. Corresponds to the JSON property truePositiveCount

Returns:

  • (Fixnum)


3943
3944
3945
# File 'lib/google/apis/language_v1/classes.rb', line 3943

def true_positive_count
  @true_positive_count
end

#true_positive_rateFloat

TPR = #true positives / (#true positives + #false negatvies) Corresponds to the JSON property truePositiveRate

Returns:

  • (Float)


3948
3949
3950
# File 'lib/google/apis/language_v1/classes.rb', line 3948

def true_positive_rate
  @true_positive_rate
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
# File 'lib/google/apis/language_v1/classes.rb', line 3955

def update!(**args)
  @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
  @f1_score = args[:f1_score] if args.key?(:f1_score)
  @false_negative_count = args[:false_negative_count] if args.key?(:false_negative_count)
  @false_positive_count = args[:false_positive_count] if args.key?(:false_positive_count)
  @false_positive_rate = args[:false_positive_rate] if args.key?(:false_positive_rate)
  @precision = args[:precision] if args.key?(:precision)
  @recall = args[:recall] if args.key?(:recall)
  @true_negative_count = args[:true_negative_count] if args.key?(:true_negative_count)
  @true_positive_count = args[:true_positive_count] if args.key?(:true_positive_count)
  @true_positive_rate = args[:true_positive_rate] if args.key?(:true_positive_rate)
end