Class: Google::Apis::LanguageV1::XpsEvaluationMetrics

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

Contains xPS-specific model evaluation metrics either for a single annotation spec (label), or for the model overall. Next tag: 18.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsEvaluationMetrics

Returns a new instance of XpsEvaluationMetrics.



2270
2271
2272
# File 'lib/google/apis/language_v1/classes.rb', line 2270

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

Instance Attribute Details

#annotation_spec_id_tokenString

The annotation_spec for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The value comes from the input annotations in AnnotatedExample. For MVP product or for text sentiment models where annotation_spec_id_token is not available, set label instead. Corresponds to the JSON property annotationSpecIdToken

Returns:

  • (String)


2175
2176
2177
# File 'lib/google/apis/language_v1/classes.rb', line 2175

def annotation_spec_id_token
  @annotation_spec_id_token
end

#categoryFixnum

The integer category label for which this evaluation metric instance had been created. Valid categories are 0 or higher. Overall model evaluation should set this to negative values (rather than implicit zero). Only used for Image Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP Image Segmentation should use annotation_spec_id_token. Corresponds to the JSON property category

Returns:

  • (Fixnum)


2184
2185
2186
# File 'lib/google/apis/language_v1/classes.rb', line 2184

def category
  @category
end

#evaluated_example_countFixnum

The number of examples used to create this evaluation metrics instance. Corresponds to the JSON property evaluatedExampleCount

Returns:

  • (Fixnum)


2189
2190
2191
# File 'lib/google/apis/language_v1/classes.rb', line 2189

def evaluated_example_count
  @evaluated_example_count
end

#image_classification_eval_metricsGoogle::Apis::LanguageV1::XpsClassificationEvaluationMetrics

Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9. Corresponds to the JSON property imageClassificationEvalMetrics



2195
2196
2197
# File 'lib/google/apis/language_v1/classes.rb', line 2195

def image_classification_eval_metrics
  @image_classification_eval_metrics
end

#image_object_detection_eval_metricsGoogle::Apis::LanguageV1::XpsImageObjectDetectionEvaluationMetrics

Model evaluation metrics for image object detection problems. Evaluates prediction quality of labeled bounding boxes. Corresponds to the JSON property imageObjectDetectionEvalMetrics



2201
2202
2203
# File 'lib/google/apis/language_v1/classes.rb', line 2201

def image_object_detection_eval_metrics
  @image_object_detection_eval_metrics
end

#image_segmentation_eval_metricsGoogle::Apis::LanguageV1::XpsImageSegmentationEvaluationMetrics

Model evaluation metrics for image segmentation problems. Next tag: 4. Corresponds to the JSON property imageSegmentationEvalMetrics



2206
2207
2208
# File 'lib/google/apis/language_v1/classes.rb', line 2206

def image_segmentation_eval_metrics
  @image_segmentation_eval_metrics
end

#labelString

The label for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The label maps to AnnotationSpec.display_name in Public API protos. Only used by MVP implementation and text sentiment FULL implementation. Corresponds to the JSON property label

Returns:

  • (String)


2215
2216
2217
# File 'lib/google/apis/language_v1/classes.rb', line 2215

def label
  @label
end

#regression_eval_metricsGoogle::Apis::LanguageV1::XpsRegressionEvaluationMetrics

Model evaluation metrics for regression problems. It can be used for Tables. Corresponds to the JSON property regressionEvalMetrics



2220
2221
2222
# File 'lib/google/apis/language_v1/classes.rb', line 2220

def regression_eval_metrics
  @regression_eval_metrics
end

#tables_classification_eval_metricsGoogle::Apis::LanguageV1::XpsClassificationEvaluationMetrics

Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9. Corresponds to the JSON property tablesClassificationEvalMetrics



2226
2227
2228
# File 'lib/google/apis/language_v1/classes.rb', line 2226

def tables_classification_eval_metrics
  @tables_classification_eval_metrics
end

#tables_eval_metricsGoogle::Apis::LanguageV1::XpsTablesEvaluationMetrics

Corresponds to the JSON property tablesEvalMetrics



2231
2232
2233
# File 'lib/google/apis/language_v1/classes.rb', line 2231

def tables_eval_metrics
  @tables_eval_metrics
end

#text_classification_eval_metricsGoogle::Apis::LanguageV1::XpsClassificationEvaluationMetrics

Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9. Corresponds to the JSON property textClassificationEvalMetrics



2237
2238
2239
# File 'lib/google/apis/language_v1/classes.rb', line 2237

def text_classification_eval_metrics
  @text_classification_eval_metrics
end

#text_extraction_eval_metricsGoogle::Apis::LanguageV1::XpsTextExtractionEvaluationMetrics

Corresponds to the JSON property textExtractionEvalMetrics



2242
2243
2244
# File 'lib/google/apis/language_v1/classes.rb', line 2242

def text_extraction_eval_metrics
  @text_extraction_eval_metrics
end

#text_sentiment_eval_metricsGoogle::Apis::LanguageV1::XpsTextSentimentEvaluationMetrics

Model evaluation metrics for text sentiment problems. Corresponds to the JSON property textSentimentEvalMetrics



2247
2248
2249
# File 'lib/google/apis/language_v1/classes.rb', line 2247

def text_sentiment_eval_metrics
  @text_sentiment_eval_metrics
end

#translation_eval_metricsGoogle::Apis::LanguageV1::XpsTranslationEvaluationMetrics

Evaluation metrics for the dataset. Corresponds to the JSON property translationEvalMetrics



2252
2253
2254
# File 'lib/google/apis/language_v1/classes.rb', line 2252

def translation_eval_metrics
  @translation_eval_metrics
end

#video_action_recognition_eval_metricsGoogle::Apis::LanguageV1::XpsVideoActionRecognitionEvaluationMetrics

Model evaluation metrics for video action recognition. Corresponds to the JSON property videoActionRecognitionEvalMetrics



2257
2258
2259
# File 'lib/google/apis/language_v1/classes.rb', line 2257

def video_action_recognition_eval_metrics
  @video_action_recognition_eval_metrics
end

#video_classification_eval_metricsGoogle::Apis::LanguageV1::XpsClassificationEvaluationMetrics

Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9. Corresponds to the JSON property videoClassificationEvalMetrics



2263
2264
2265
# File 'lib/google/apis/language_v1/classes.rb', line 2263

def video_classification_eval_metrics
  @video_classification_eval_metrics
end

#video_object_tracking_eval_metricsGoogle::Apis::LanguageV1::XpsVideoObjectTrackingEvaluationMetrics

Model evaluation metrics for ObjectTracking problems. Next tag: 10. Corresponds to the JSON property videoObjectTrackingEvalMetrics



2268
2269
2270
# File 'lib/google/apis/language_v1/classes.rb', line 2268

def video_object_tracking_eval_metrics
  @video_object_tracking_eval_metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
# File 'lib/google/apis/language_v1/classes.rb', line 2275

def update!(**args)
  @annotation_spec_id_token = args[:annotation_spec_id_token] if args.key?(:annotation_spec_id_token)
  @category = args[:category] if args.key?(:category)
  @evaluated_example_count = args[:evaluated_example_count] if args.key?(:evaluated_example_count)
  @image_classification_eval_metrics = args[:image_classification_eval_metrics] if args.key?(:image_classification_eval_metrics)
  @image_object_detection_eval_metrics = args[:image_object_detection_eval_metrics] if args.key?(:image_object_detection_eval_metrics)
  @image_segmentation_eval_metrics = args[:image_segmentation_eval_metrics] if args.key?(:image_segmentation_eval_metrics)
  @label = args[:label] if args.key?(:label)
  @regression_eval_metrics = args[:regression_eval_metrics] if args.key?(:regression_eval_metrics)
  @tables_classification_eval_metrics = args[:tables_classification_eval_metrics] if args.key?(:tables_classification_eval_metrics)
  @tables_eval_metrics = args[:tables_eval_metrics] if args.key?(:tables_eval_metrics)
  @text_classification_eval_metrics = args[:text_classification_eval_metrics] if args.key?(:text_classification_eval_metrics)
  @text_extraction_eval_metrics = args[:text_extraction_eval_metrics] if args.key?(:text_extraction_eval_metrics)
  @text_sentiment_eval_metrics = args[:text_sentiment_eval_metrics] if args.key?(:text_sentiment_eval_metrics)
  @translation_eval_metrics = args[:translation_eval_metrics] if args.key?(:translation_eval_metrics)
  @video_action_recognition_eval_metrics = args[:video_action_recognition_eval_metrics] if args.key?(:video_action_recognition_eval_metrics)
  @video_classification_eval_metrics = args[:video_classification_eval_metrics] if args.key?(:video_classification_eval_metrics)
  @video_object_tracking_eval_metrics = args[:video_object_tracking_eval_metrics] if args.key?(:video_object_tracking_eval_metrics)
end