Class: Google::Apis::LanguageV1::XpsClassificationEvaluationMetrics

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

Overview

Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsClassificationEvaluationMetrics

Returns a new instance of XpsClassificationEvaluationMetrics.



1493
1494
1495
# File 'lib/google/apis/language_v1/classes.rb', line 1493

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

Instance Attribute Details

#au_prcFloat

The Area under precision recall curve metric. Corresponds to the JSON property auPrc

Returns:

  • (Float)


1459
1460
1461
# File 'lib/google/apis/language_v1/classes.rb', line 1459

def au_prc
  @au_prc
end

#au_rocFloat

The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation. Corresponds to the JSON property auRoc

Returns:

  • (Float)


1465
1466
1467
# File 'lib/google/apis/language_v1/classes.rb', line 1465

def au_roc
  @au_roc
end

#base_au_prcFloat

The Area under precision recall curve metric based on priors. Corresponds to the JSON property baseAuPrc

Returns:

  • (Float)


1470
1471
1472
# File 'lib/google/apis/language_v1/classes.rb', line 1470

def base_au_prc
  @base_au_prc
end

#confidence_metrics_entriesArray<Google::Apis::LanguageV1::XpsConfidenceMetricsEntry>

Metrics that have confidence thresholds. Precision-recall curve can be derived from it. Corresponds to the JSON property confidenceMetricsEntries



1476
1477
1478
# File 'lib/google/apis/language_v1/classes.rb', line 1476

def confidence_metrics_entries
  @confidence_metrics_entries
end

#confusion_matrixGoogle::Apis::LanguageV1::XpsConfusionMatrix

Confusion matrix of the model running the classification. Corresponds to the JSON property confusionMatrix



1481
1482
1483
# File 'lib/google/apis/language_v1/classes.rb', line 1481

def confusion_matrix
  @confusion_matrix
end

#evaluated_examples_countFixnum

The number of examples used for model evaluation. Corresponds to the JSON property evaluatedExamplesCount

Returns:

  • (Fixnum)


1486
1487
1488
# File 'lib/google/apis/language_v1/classes.rb', line 1486

def evaluated_examples_count
  @evaluated_examples_count
end

#log_lossFloat

The Log Loss metric. Corresponds to the JSON property logLoss

Returns:

  • (Float)


1491
1492
1493
# File 'lib/google/apis/language_v1/classes.rb', line 1491

def log_loss
  @log_loss
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1498
1499
1500
1501
1502
1503
1504
1505
1506
# File 'lib/google/apis/language_v1/classes.rb', line 1498

def update!(**args)
  @au_prc = args[:au_prc] if args.key?(:au_prc)
  @au_roc = args[:au_roc] if args.key?(:au_roc)
  @base_au_prc = args[:base_au_prc] if args.key?(:base_au_prc)
  @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
  @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
  @evaluated_examples_count = args[:evaluated_examples_count] if args.key?(:evaluated_examples_count)
  @log_loss = args[:log_loss] if args.key?(:log_loss)
end