Class: Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1ClassificationMetrics

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/datalabeling_v1beta1/classes.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb

Overview

Metrics calculated for a classification model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDatalabelingV1beta1ClassificationMetrics

Returns a new instance of GoogleCloudDatalabelingV1beta1ClassificationMetrics.



1306
1307
1308
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 1306

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

Instance Attribute Details

#confusion_matrixGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1ConfusionMatrix

Confusion matrix of the model running the classification. Only applicable when the metrics entry aggregates multiple labels. Not applicable when the entry is for a single label. Corresponds to the JSON property confusionMatrix



1298
1299
1300
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 1298

def confusion_matrix
  @confusion_matrix
end

#pr_curveGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1PrCurve

Precision-recall curve based on ground truth labels, predicted labels, and scores for the predicted labels. Corresponds to the JSON property prCurve



1304
1305
1306
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 1304

def pr_curve
  @pr_curve
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1311
1312
1313
1314
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 1311

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