class Google::Apis::BigqueryV2::AggregateClassificationMetrics

Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows.

Attributes

accuracy[RW]

Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. Corresponds to the JSON property `accuracy` @return [Float]

f1_score[RW]

The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. Corresponds to the JSON property `f1Score` @return [Float]

log_loss[RW]

Logarithmic Loss. For multiclass this is a macro-averaged metric. Corresponds to the JSON property `logLoss` @return [Float]

precision[RW]

Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier. Corresponds to the JSON property `precision` @return [Float]

recall[RW]

Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric. Corresponds to the JSON property `recall` @return [Float]

roc_auc[RW]

Area Under a ROC Curve. For multiclass this is a macro-averaged metric. Corresponds to the JSON property `rocAuc` @return [Float]

threshold[RW]

Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold. Corresponds to the JSON property `threshold` @return [Float]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/bigquery_v2/classes.rb, line 75
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/bigquery_v2/classes.rb, line 80
def update!(**args)
  @accuracy = args[:accuracy] if args.key?(:accuracy)
  @f1_score = args[:f1_score] if args.key?(:f1_score)
  @log_loss = args[:log_loss] if args.key?(:log_loss)
  @precision = args[:precision] if args.key?(:precision)
  @recall = args[:recall] if args.key?(:recall)
  @roc_auc = args[:roc_auc] if args.key?(:roc_auc)
  @threshold = args[:threshold] if args.key?(:threshold)
end