Class: Google::Apis::LanguageV1beta2::XpsTablesConfidenceMetricsEntry
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta2::XpsTablesConfidenceMetricsEntry
- 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
Metrics for a single confidence threshold.
Instance Attribute Summary collapse
-
#confidence_threshold ⇒ Float
The confidence threshold value used to compute the metrics.
-
#f1_score ⇒ Float
The harmonic mean of recall and precision.
-
#false_negative_count ⇒ Fixnum
False negative count.
-
#false_positive_count ⇒ Fixnum
False positive count.
-
#false_positive_rate ⇒ Float
FPR = #false positives / (#false positives + #true negatives) Corresponds to the JSON property
falsePositiveRate
. -
#precision ⇒ Float
Precision = #true positives / (#true positives + #false positives).
-
#recall ⇒ Float
Recall = #true positives / (#true positives + #false negatives).
-
#true_negative_count ⇒ Fixnum
True negative count.
-
#true_positive_count ⇒ Fixnum
True positive count.
-
#true_positive_rate ⇒ Float
TPR = #true positives / (#true positives + #false negatvies) Corresponds to the JSON property
truePositiveRate
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ XpsTablesConfidenceMetricsEntry
constructor
A new instance of XpsTablesConfidenceMetricsEntry.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ XpsTablesConfidenceMetricsEntry
Returns a new instance of XpsTablesConfidenceMetricsEntry.
3970 3971 3972 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3970 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confidence_threshold ⇒ Float
The confidence threshold value used to compute the metrics.
Corresponds to the JSON property confidenceThreshold
3922 3923 3924 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3922 def confidence_threshold @confidence_threshold end |
#f1_score ⇒ Float
The harmonic mean of recall and precision. (2 * precision * recall) / (
precision + recall)
Corresponds to the JSON property f1Score
3928 3929 3930 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3928 def f1_score @f1_score end |
#false_negative_count ⇒ Fixnum
False negative count.
Corresponds to the JSON property falseNegativeCount
3933 3934 3935 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3933 def false_negative_count @false_negative_count end |
#false_positive_count ⇒ Fixnum
False positive count.
Corresponds to the JSON property falsePositiveCount
3938 3939 3940 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3938 def false_positive_count @false_positive_count end |
#false_positive_rate ⇒ Float
FPR = #false positives / (#false positives + #true negatives)
Corresponds to the JSON property falsePositiveRate
3943 3944 3945 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3943 def false_positive_rate @false_positive_rate end |
#precision ⇒ Float
Precision = #true positives / (#true positives + #false positives).
Corresponds to the JSON property precision
3948 3949 3950 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3948 def precision @precision end |
#recall ⇒ Float
Recall = #true positives / (#true positives + #false negatives).
Corresponds to the JSON property recall
3953 3954 3955 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3953 def recall @recall end |
#true_negative_count ⇒ Fixnum
True negative count.
Corresponds to the JSON property trueNegativeCount
3958 3959 3960 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3958 def true_negative_count @true_negative_count end |
#true_positive_count ⇒ Fixnum
True positive count.
Corresponds to the JSON property truePositiveCount
3963 3964 3965 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3963 def true_positive_count @true_positive_count end |
#true_positive_rate ⇒ Float
TPR = #true positives / (#true positives + #false negatvies)
Corresponds to the JSON property truePositiveRate
3968 3969 3970 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3968 def true_positive_rate @true_positive_rate end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3975 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 |