Class: Google::Apis::BigqueryV2::BinaryConfusionMatrix
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::BinaryConfusionMatrix
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/bigquery_v2/classes.rb,
generated/google/apis/bigquery_v2/representations.rb,
generated/google/apis/bigquery_v2/representations.rb
Overview
Confusion matrix for binary classification models.
Instance Attribute Summary collapse
-
#false_negatives ⇒ Fixnum
Number of false samples predicted as false.
-
#false_positives ⇒ Fixnum
Number of false samples predicted as true.
-
#positive_class_threshold ⇒ Float
Threshold value used when computing each of the following metric.
-
#precision ⇒ Float
Aggregate precision.
-
#recall ⇒ Float
Aggregate recall.
-
#true_negatives ⇒ Fixnum
Number of true samples predicted as false.
-
#true_positives ⇒ Fixnum
Number of true samples predicted as true.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BinaryConfusionMatrix
constructor
A new instance of BinaryConfusionMatrix.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ BinaryConfusionMatrix
Returns a new instance of BinaryConfusionMatrix
362 363 364 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 362 def initialize(**args) update!(**args) end |
Instance Attribute Details
#false_negatives ⇒ Fixnum
Number of false samples predicted as false.
Corresponds to the JSON property falseNegatives
330 331 332 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 330 def false_negatives @false_negatives end |
#false_positives ⇒ Fixnum
Number of false samples predicted as true.
Corresponds to the JSON property falsePositives
335 336 337 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 335 def false_positives @false_positives end |
#positive_class_threshold ⇒ Float
Threshold value used when computing each of the following metric.
Corresponds to the JSON property positiveClassThreshold
340 341 342 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 340 def positive_class_threshold @positive_class_threshold end |
#precision ⇒ Float
Aggregate precision.
Corresponds to the JSON property precision
345 346 347 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 345 def precision @precision end |
#recall ⇒ Float
Aggregate recall.
Corresponds to the JSON property recall
350 351 352 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 350 def recall @recall end |
#true_negatives ⇒ Fixnum
Number of true samples predicted as false.
Corresponds to the JSON property trueNegatives
355 356 357 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 355 def true_negatives @true_negatives end |
#true_positives ⇒ Fixnum
Number of true samples predicted as true.
Corresponds to the JSON property truePositives
360 361 362 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 360 def true_positives @true_positives end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
367 368 369 370 371 372 373 374 375 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 367 def update!(**args) @false_negatives = args[:false_negatives] if args.key?(:false_negatives) @false_positives = args[:false_positives] if args.key?(:false_positives) @positive_class_threshold = args[:positive_class_threshold] if args.key?(:positive_class_threshold) @precision = args[:precision] if args.key?(:precision) @recall = args[:recall] if args.key?(:recall) @true_negatives = args[:true_negatives] if args.key?(:true_negatives) @true_positives = args[:true_positives] if args.key?(:true_positives) end |