Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EvaluationMetrics

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

Overview

Evaluation metrics, either in aggregate or about a specific entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1EvaluationMetrics

Returns a new instance of GoogleCloudDocumentaiV1EvaluationMetrics.



2565
2566
2567
# File 'lib/google/apis/documentai_v1/classes.rb', line 2565

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

Instance Attribute Details

#f1_scoreFloat

The calculated f1 score. Corresponds to the JSON property f1Score

Returns:

  • (Float)


2523
2524
2525
# File 'lib/google/apis/documentai_v1/classes.rb', line 2523

def f1_score
  @f1_score
end

#false_negatives_countFixnum

The amount of false negatives. Corresponds to the JSON property falseNegativesCount

Returns:

  • (Fixnum)


2528
2529
2530
# File 'lib/google/apis/documentai_v1/classes.rb', line 2528

def false_negatives_count
  @false_negatives_count
end

#false_positives_countFixnum

The amount of false positives. Corresponds to the JSON property falsePositivesCount

Returns:

  • (Fixnum)


2533
2534
2535
# File 'lib/google/apis/documentai_v1/classes.rb', line 2533

def false_positives_count
  @false_positives_count
end

#ground_truth_occurrences_countFixnum

The amount of occurrences in ground truth documents. Corresponds to the JSON property groundTruthOccurrencesCount

Returns:

  • (Fixnum)


2538
2539
2540
# File 'lib/google/apis/documentai_v1/classes.rb', line 2538

def ground_truth_occurrences_count
  @ground_truth_occurrences_count
end

#precisionFloat

The calculated precision. Corresponds to the JSON property precision

Returns:

  • (Float)


2543
2544
2545
# File 'lib/google/apis/documentai_v1/classes.rb', line 2543

def precision
  @precision
end

#predicted_occurrences_countFixnum

The amount of occurrences in predicted documents. Corresponds to the JSON property predictedOccurrencesCount

Returns:

  • (Fixnum)


2548
2549
2550
# File 'lib/google/apis/documentai_v1/classes.rb', line 2548

def predicted_occurrences_count
  @predicted_occurrences_count
end

#recallFloat

The calculated recall. Corresponds to the JSON property recall

Returns:

  • (Float)


2553
2554
2555
# File 'lib/google/apis/documentai_v1/classes.rb', line 2553

def recall
  @recall
end

#total_documents_countFixnum

The amount of documents that had an occurrence of this label. Corresponds to the JSON property totalDocumentsCount

Returns:

  • (Fixnum)


2558
2559
2560
# File 'lib/google/apis/documentai_v1/classes.rb', line 2558

def total_documents_count
  @total_documents_count
end

#true_positives_countFixnum

The amount of true positives. Corresponds to the JSON property truePositivesCount

Returns:

  • (Fixnum)


2563
2564
2565
# File 'lib/google/apis/documentai_v1/classes.rb', line 2563

def true_positives_count
  @true_positives_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
# File 'lib/google/apis/documentai_v1/classes.rb', line 2570

def update!(**args)
  @f1_score = args[:f1_score] if args.key?(:f1_score)
  @false_negatives_count = args[:false_negatives_count] if args.key?(:false_negatives_count)
  @false_positives_count = args[:false_positives_count] if args.key?(:false_positives_count)
  @ground_truth_occurrences_count = args[:ground_truth_occurrences_count] if args.key?(:ground_truth_occurrences_count)
  @precision = args[:precision] if args.key?(:precision)
  @predicted_occurrences_count = args[:predicted_occurrences_count] if args.key?(:predicted_occurrences_count)
  @recall = args[:recall] if args.key?(:recall)
  @total_documents_count = args[:total_documents_count] if args.key?(:total_documents_count)
  @true_positives_count = args[:true_positives_count] if args.key?(:true_positives_count)
end