Class: Google::Apis::LanguageV1beta2::XpsConfidenceMetricsEntry
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta2::XpsConfidenceMetricsEntry
- 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
ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16.
Instance Attribute Summary collapse
-
#confidence_threshold ⇒ Float
Metrics are computed with an assumption that the model never return predictions with score lower than this value.
-
#f1_score ⇒ Float
The harmonic mean of recall and precision.
-
#f1_score_at1 ⇒ Float
The harmonic mean of recall_at1 and precision_at1.
-
#false_negative_count ⇒ Fixnum
The number of ground truth labels that are not matched by a model created label.
-
#false_positive_count ⇒ Fixnum
The number of model created labels that do not match a ground truth label.
-
#false_positive_rate ⇒ Float
False Positive Rate for the given confidence threshold.
-
#false_positive_rate_at1 ⇒ Float
The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.
-
#position_threshold ⇒ Fixnum
Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.
-
#precision ⇒ Float
Precision for the given confidence threshold.
-
#precision_at1 ⇒ Float
The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.
-
#recall ⇒ Float
Recall (true positive rate) for the given confidence threshold.
-
#recall_at1 ⇒ Float
The recall (true positive rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.
-
#true_negative_count ⇒ Fixnum
The number of labels that were not created by the model, but if they would, they would not match a ground truth label.
-
#true_positive_count ⇒ Fixnum
The number of model created labels that match a ground truth label.
Instance Method Summary collapse
-
#initialize(**args) ⇒ XpsConfidenceMetricsEntry
constructor
A new instance of XpsConfidenceMetricsEntry.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ XpsConfidenceMetricsEntry
Returns a new instance of XpsConfidenceMetricsEntry.
1862 1863 1864 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1862 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confidence_threshold ⇒ Float
Metrics are computed with an assumption that the model never return
predictions with score lower than this value.
Corresponds to the JSON property confidenceThreshold
1787 1788 1789 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1787 def confidence_threshold @confidence_threshold end |
#f1_score ⇒ Float
The harmonic mean of recall and precision.
Corresponds to the JSON property f1Score
1792 1793 1794 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1792 def f1_score @f1_score end |
#f1_score_at1 ⇒ Float
The harmonic mean of recall_at1 and precision_at1.
Corresponds to the JSON property f1ScoreAt1
1797 1798 1799 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1797 def f1_score_at1 @f1_score_at1 end |
#false_negative_count ⇒ Fixnum
The number of ground truth labels that are not matched by a model created
label.
Corresponds to the JSON property falseNegativeCount
1803 1804 1805 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1803 def false_negative_count @false_negative_count end |
#false_positive_count ⇒ Fixnum
The number of model created labels that do not match a ground truth label.
Corresponds to the JSON property falsePositiveCount
1808 1809 1810 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1808 def false_positive_count @false_positive_count end |
#false_positive_rate ⇒ Float
False Positive Rate for the given confidence threshold.
Corresponds to the JSON property falsePositiveRate
1813 1814 1815 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1813 def false_positive_rate @false_positive_rate end |
#false_positive_rate_at1 ⇒ Float
The False Positive Rate when only considering the label that has the highest
prediction score and not below the confidence threshold for each example.
Corresponds to the JSON property falsePositiveRateAt1
1819 1820 1821 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1819 def false_positive_rate_at1 @false_positive_rate_at1 end |
#position_threshold ⇒ Fixnum
Metrics are computed with an assumption that the model always returns at most
this many predictions (ordered by their score, descendingly), but they all
still need to meet the confidence_threshold.
Corresponds to the JSON property positionThreshold
1826 1827 1828 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1826 def position_threshold @position_threshold end |
#precision ⇒ Float
Precision for the given confidence threshold.
Corresponds to the JSON property precision
1831 1832 1833 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1831 def precision @precision end |
#precision_at1 ⇒ Float
The precision when only considering the label that has the highest prediction
score and not below the confidence threshold for each example.
Corresponds to the JSON property precisionAt1
1837 1838 1839 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1837 def precision_at1 @precision_at1 end |
#recall ⇒ Float
Recall (true positive rate) for the given confidence threshold.
Corresponds to the JSON property recall
1842 1843 1844 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1842 def recall @recall end |
#recall_at1 ⇒ Float
The recall (true positive rate) when only considering the label that has the
highest prediction score and not below the confidence threshold for each
example.
Corresponds to the JSON property recallAt1
1849 1850 1851 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1849 def recall_at1 @recall_at1 end |
#true_negative_count ⇒ Fixnum
The number of labels that were not created by the model, but if they would,
they would not match a ground truth label.
Corresponds to the JSON property trueNegativeCount
1855 1856 1857 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1855 def true_negative_count @true_negative_count end |
#true_positive_count ⇒ Fixnum
The number of model created labels that match a ground truth label.
Corresponds to the JSON property truePositiveCount
1860 1861 1862 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1860 def true_positive_count @true_positive_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 |
# File 'lib/google/apis/language_v1beta2/classes.rb', line 1867 def update!(**args) @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold) @f1_score = args[:f1_score] if args.key?(:f1_score) @f1_score_at1 = args[:f1_score_at1] if args.key?(:f1_score_at1) @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) @false_positive_rate_at1 = args[:false_positive_rate_at1] if args.key?(:false_positive_rate_at1) @position_threshold = args[:position_threshold] if args.key?(:position_threshold) @precision = args[:precision] if args.key?(:precision) @precision_at1 = args[:precision_at1] if args.key?(:precision_at1) @recall = args[:recall] if args.key?(:recall) @recall_at1 = args[:recall_at1] if args.key?(:recall_at1) @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) end |