Class: Google::Apis::LanguageV2::XpsTextExtractionEvaluationMetrics

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsTextExtractionEvaluationMetrics

Returns a new instance of XpsTextExtractionEvaluationMetrics.



4122
4123
4124
# File 'lib/google/apis/language_v2/classes.rb', line 4122

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

Instance Attribute Details

#best_f1_confidence_metricsGoogle::Apis::LanguageV2::XpsConfidenceMetricsEntry

ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16. Corresponds to the JSON property bestF1ConfidenceMetrics



4102
4103
4104
# File 'lib/google/apis/language_v2/classes.rb', line 4102

def best_f1_confidence_metrics
  @best_f1_confidence_metrics
end

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

If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries is an evaluation of the entire model across all labels. If the enclosing EvaluationMetrics.label is set, confidence_metrics_entries applies to that label. Corresponds to the JSON property confidenceMetricsEntries



4110
4111
4112
# File 'lib/google/apis/language_v2/classes.rb', line 4110

def confidence_metrics_entries
  @confidence_metrics_entries
end

#confusion_matrixGoogle::Apis::LanguageV2::XpsConfusionMatrix

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



4115
4116
4117
# File 'lib/google/apis/language_v2/classes.rb', line 4115

def confusion_matrix
  @confusion_matrix
end

#per_label_confidence_metricsHash<String,Google::Apis::LanguageV2::XpsConfidenceMetricsEntry>

Only recall, precision, and f1_score will be set. Corresponds to the JSON property perLabelConfidenceMetrics



4120
4121
4122
# File 'lib/google/apis/language_v2/classes.rb', line 4120

def per_label_confidence_metrics
  @per_label_confidence_metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4127
4128
4129
4130
4131
4132
# File 'lib/google/apis/language_v2/classes.rb', line 4127

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