google-apis-language_v1 0.19.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -260,7 +260,7 @@ module Google
260
260
  # All available features for sentiment, syntax, and semantic analysis. Setting
261
261
  # each one to true will enable that specific analysis for the input.
262
262
  # Corresponds to the JSON property `features`
263
- # @return [Google::Apis::LanguageV1::Features]
263
+ # @return [Google::Apis::LanguageV1::AnnotateTextRequestFeatures]
264
264
  attr_accessor :features
265
265
 
266
266
  def initialize(**args)
@@ -275,6 +275,68 @@ module Google
275
275
  end
276
276
  end
277
277
 
278
+ # All available features for sentiment, syntax, and semantic analysis. Setting
279
+ # each one to true will enable that specific analysis for the input.
280
+ class AnnotateTextRequestFeatures
281
+ include Google::Apis::Core::Hashable
282
+
283
+ # Model options available for classification requests.
284
+ # Corresponds to the JSON property `classificationModelOptions`
285
+ # @return [Google::Apis::LanguageV1::ClassificationModelOptions]
286
+ attr_accessor :classification_model_options
287
+
288
+ # Classify the full document into categories.
289
+ # Corresponds to the JSON property `classifyText`
290
+ # @return [Boolean]
291
+ attr_accessor :classify_text
292
+ alias_method :classify_text?, :classify_text
293
+
294
+ # Extract document-level sentiment.
295
+ # Corresponds to the JSON property `extractDocumentSentiment`
296
+ # @return [Boolean]
297
+ attr_accessor :extract_document_sentiment
298
+ alias_method :extract_document_sentiment?, :extract_document_sentiment
299
+
300
+ # Extract entities.
301
+ # Corresponds to the JSON property `extractEntities`
302
+ # @return [Boolean]
303
+ attr_accessor :extract_entities
304
+ alias_method :extract_entities?, :extract_entities
305
+
306
+ # Extract entities and their associated sentiment.
307
+ # Corresponds to the JSON property `extractEntitySentiment`
308
+ # @return [Boolean]
309
+ attr_accessor :extract_entity_sentiment
310
+ alias_method :extract_entity_sentiment?, :extract_entity_sentiment
311
+
312
+ # Extract syntax information.
313
+ # Corresponds to the JSON property `extractSyntax`
314
+ # @return [Boolean]
315
+ attr_accessor :extract_syntax
316
+ alias_method :extract_syntax?, :extract_syntax
317
+
318
+ # Moderate the document for harmful and sensitive categories.
319
+ # Corresponds to the JSON property `moderateText`
320
+ # @return [Boolean]
321
+ attr_accessor :moderate_text
322
+ alias_method :moderate_text?, :moderate_text
323
+
324
+ def initialize(**args)
325
+ update!(**args)
326
+ end
327
+
328
+ # Update properties of this object
329
+ def update!(**args)
330
+ @classification_model_options = args[:classification_model_options] if args.key?(:classification_model_options)
331
+ @classify_text = args[:classify_text] if args.key?(:classify_text)
332
+ @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
333
+ @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
334
+ @extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment)
335
+ @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
336
+ @moderate_text = args[:moderate_text] if args.key?(:moderate_text)
337
+ end
338
+ end
339
+
278
340
  # The text annotations response message.
279
341
  class AnnotateTextResponse
280
342
  include Google::Apis::Core::Hashable
@@ -367,12 +429,12 @@ module Google
367
429
 
368
430
  # Options for the V1 model.
369
431
  # Corresponds to the JSON property `v1Model`
370
- # @return [Google::Apis::LanguageV1::V1Model]
432
+ # @return [Google::Apis::LanguageV1::ClassificationModelOptionsV1Model]
371
433
  attr_accessor :v1_model
372
434
 
373
435
  # Options for the V2 model.
374
436
  # Corresponds to the JSON property `v2Model`
375
- # @return [Google::Apis::LanguageV1::V2Model]
437
+ # @return [Google::Apis::LanguageV1::ClassificationModelOptionsV2Model]
376
438
  attr_accessor :v2_model
377
439
 
378
440
  def initialize(**args)
@@ -386,6 +448,38 @@ module Google
386
448
  end
387
449
  end
388
450
 
451
+ # Options for the V1 model.
452
+ class ClassificationModelOptionsV1Model
453
+ include Google::Apis::Core::Hashable
454
+
455
+ def initialize(**args)
456
+ update!(**args)
457
+ end
458
+
459
+ # Update properties of this object
460
+ def update!(**args)
461
+ end
462
+ end
463
+
464
+ # Options for the V2 model.
465
+ class ClassificationModelOptionsV2Model
466
+ include Google::Apis::Core::Hashable
467
+
468
+ # The content categories used for classification.
469
+ # Corresponds to the JSON property `contentCategoriesVersion`
470
+ # @return [String]
471
+ attr_accessor :content_categories_version
472
+
473
+ def initialize(**args)
474
+ update!(**args)
475
+ end
476
+
477
+ # Update properties of this object
478
+ def update!(**args)
479
+ @content_categories_version = args[:content_categories_version] if args.key?(:content_categories_version)
480
+ end
481
+ end
482
+
389
483
  # The document classification request message.
390
484
  class ClassifyTextRequest
391
485
  include Google::Apis::Core::Hashable
@@ -430,6 +524,140 @@ module Google
430
524
  end
431
525
  end
432
526
 
527
+ # Represents a color in the RGBA color space. This representation is designed
528
+ # for simplicity of conversion to and from color representations in various
529
+ # languages over compactness. For example, the fields of this representation can
530
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
531
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
532
+ # method in iOS; and, with just a little work, it can be easily formatted into a
533
+ # CSS `rgba()` string in JavaScript. This reference page doesn't have
534
+ # information about the absolute color space that should be used to interpret
535
+ # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
536
+ # applications should assume the sRGB color space. When color equality needs to
537
+ # be decided, implementations, unless documented otherwise, treat two colors as
538
+ # equal if all their red, green, blue, and alpha values each differ by at most `
539
+ # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
540
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
541
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
542
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
543
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
544
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
545
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
546
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
547
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
548
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
549
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
550
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
551
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
552
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
553
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
554
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
555
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
556
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
557
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
558
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
559
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
560
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
561
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
562
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
563
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
564
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
565
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
566
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
567
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
568
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
569
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
570
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
571
+ # / ...
572
+ class Color
573
+ include Google::Apis::Core::Hashable
574
+
575
+ # The fraction of this color that should be applied to the pixel. That is, the
576
+ # final pixel color is defined by the equation: `pixel color = alpha * (this
577
+ # color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
578
+ # corresponds to a solid color, whereas a value of 0.0 corresponds to a
579
+ # completely transparent color. This uses a wrapper message rather than a simple
580
+ # float scalar so that it is possible to distinguish between a default value and
581
+ # the value being unset. If omitted, this color object is rendered as a solid
582
+ # color (as if the alpha value had been explicitly given a value of 1.0).
583
+ # Corresponds to the JSON property `alpha`
584
+ # @return [Float]
585
+ attr_accessor :alpha
586
+
587
+ # The amount of blue in the color as a value in the interval [0, 1].
588
+ # Corresponds to the JSON property `blue`
589
+ # @return [Float]
590
+ attr_accessor :blue
591
+
592
+ # The amount of green in the color as a value in the interval [0, 1].
593
+ # Corresponds to the JSON property `green`
594
+ # @return [Float]
595
+ attr_accessor :green
596
+
597
+ # The amount of red in the color as a value in the interval [0, 1].
598
+ # Corresponds to the JSON property `red`
599
+ # @return [Float]
600
+ attr_accessor :red
601
+
602
+ def initialize(**args)
603
+ update!(**args)
604
+ end
605
+
606
+ # Update properties of this object
607
+ def update!(**args)
608
+ @alpha = args[:alpha] if args.key?(:alpha)
609
+ @blue = args[:blue] if args.key?(:blue)
610
+ @green = args[:green] if args.key?(:green)
611
+ @red = args[:red] if args.key?(:red)
612
+ end
613
+ end
614
+
615
+ # Metric for billing reports.
616
+ class CpuMetric
617
+ include Google::Apis::Core::Hashable
618
+
619
+ # Required. Number of CPU cores.
620
+ # Corresponds to the JSON property `coreNumber`
621
+ # @return [Fixnum]
622
+ attr_accessor :core_number
623
+
624
+ # Required. Total seconds of core usage, e.g. 4.
625
+ # Corresponds to the JSON property `coreSec`
626
+ # @return [Fixnum]
627
+ attr_accessor :core_sec
628
+
629
+ # Required. Type of cpu, e.g. N2.
630
+ # Corresponds to the JSON property `cpuType`
631
+ # @return [String]
632
+ attr_accessor :cpu_type
633
+
634
+ # Required. Machine spec, e.g. N1_STANDARD_4.
635
+ # Corresponds to the JSON property `machineSpec`
636
+ # @return [String]
637
+ attr_accessor :machine_spec
638
+
639
+ # Billing tracking labels. They do not contain any user data but only the labels
640
+ # set by Vertex Core Infra itself. Tracking labels' keys are defined with
641
+ # special format: goog-[\p`Ll`\p`N`]+ E.g. "key": "goog-k8s-cluster-name","value"
642
+ # : "us-east1-b4rk"
643
+ # Corresponds to the JSON property `trackingLabels`
644
+ # @return [Hash<String,String>]
645
+ attr_accessor :tracking_labels
646
+
647
+ def initialize(**args)
648
+ update!(**args)
649
+ end
650
+
651
+ # Update properties of this object
652
+ def update!(**args)
653
+ @core_number = args[:core_number] if args.key?(:core_number)
654
+ @core_sec = args[:core_sec] if args.key?(:core_sec)
655
+ @cpu_type = args[:cpu_type] if args.key?(:cpu_type)
656
+ @machine_spec = args[:machine_spec] if args.key?(:machine_spec)
657
+ @tracking_labels = args[:tracking_labels] if args.key?(:tracking_labels)
658
+ end
659
+ end
660
+
433
661
  # Represents dependency parse tree information for a token. (For more
434
662
  # information on dependency labels, see http://www.aclweb.org/anthology/P13-2017
435
663
  class DependencyEdge
@@ -459,6 +687,31 @@ module Google
459
687
  end
460
688
  end
461
689
 
690
+ #
691
+ class DiskMetric
692
+ include Google::Apis::Core::Hashable
693
+
694
+ # Required. Type of Disk, e.g. REGIONAL_SSD.
695
+ # Corresponds to the JSON property `diskType`
696
+ # @return [String]
697
+ attr_accessor :disk_type
698
+
699
+ # Required. Seconds of physical disk usage, e.g. 3600.
700
+ # Corresponds to the JSON property `gibSec`
701
+ # @return [Fixnum]
702
+ attr_accessor :gib_sec
703
+
704
+ def initialize(**args)
705
+ update!(**args)
706
+ end
707
+
708
+ # Update properties of this object
709
+ def update!(**args)
710
+ @disk_type = args[:disk_type] if args.key?(:disk_type)
711
+ @gib_sec = args[:gib_sec] if args.key?(:gib_sec)
712
+ end
713
+ end
714
+
462
715
  # Represents the input to API methods.
463
716
  class Document
464
717
  include Google::Apis::Core::Hashable
@@ -596,51 +849,74 @@ module Google
596
849
  end
597
850
  end
598
851
 
599
- # All available features for sentiment, syntax, and semantic analysis. Setting
600
- # each one to true will enable that specific analysis for the input.
601
- class Features
852
+ #
853
+ class GpuMetric
602
854
  include Google::Apis::Core::Hashable
603
855
 
604
- # Model options available for classification requests.
605
- # Corresponds to the JSON property `classificationModelOptions`
606
- # @return [Google::Apis::LanguageV1::ClassificationModelOptions]
607
- attr_accessor :classification_model_options
856
+ # Required. Seconds of GPU usage, e.g. 3600.
857
+ # Corresponds to the JSON property `gpuSec`
858
+ # @return [Fixnum]
859
+ attr_accessor :gpu_sec
608
860
 
609
- # Classify the full document into categories.
610
- # Corresponds to the JSON property `classifyText`
611
- # @return [Boolean]
612
- attr_accessor :classify_text
613
- alias_method :classify_text?, :classify_text
861
+ # Required. Type of GPU, e.g. NVIDIA_TESLA_V100.
862
+ # Corresponds to the JSON property `gpuType`
863
+ # @return [String]
864
+ attr_accessor :gpu_type
614
865
 
615
- # Extract document-level sentiment.
616
- # Corresponds to the JSON property `extractDocumentSentiment`
617
- # @return [Boolean]
618
- attr_accessor :extract_document_sentiment
619
- alias_method :extract_document_sentiment?, :extract_document_sentiment
866
+ # Required. Machine spec, e.g. N1_STANDARD_4.
867
+ # Corresponds to the JSON property `machineSpec`
868
+ # @return [String]
869
+ attr_accessor :machine_spec
620
870
 
621
- # Extract entities.
622
- # Corresponds to the JSON property `extractEntities`
623
- # @return [Boolean]
624
- attr_accessor :extract_entities
625
- alias_method :extract_entities?, :extract_entities
871
+ # Billing tracking labels. They do not contain any user data but only the labels
872
+ # set by Vertex Core Infra itself. Tracking labels' keys are defined with
873
+ # special format: goog-[\p`Ll`\p`N`]+ E.g. "key": "goog-k8s-cluster-name","value"
874
+ # : "us-east1-b4rk"
875
+ # Corresponds to the JSON property `trackingLabels`
876
+ # @return [Hash<String,String>]
877
+ attr_accessor :tracking_labels
626
878
 
627
- # Extract entities and their associated sentiment.
628
- # Corresponds to the JSON property `extractEntitySentiment`
629
- # @return [Boolean]
630
- attr_accessor :extract_entity_sentiment
631
- alias_method :extract_entity_sentiment?, :extract_entity_sentiment
879
+ def initialize(**args)
880
+ update!(**args)
881
+ end
632
882
 
633
- # Extract syntax information.
634
- # Corresponds to the JSON property `extractSyntax`
635
- # @return [Boolean]
636
- attr_accessor :extract_syntax
637
- alias_method :extract_syntax?, :extract_syntax
883
+ # Update properties of this object
884
+ def update!(**args)
885
+ @gpu_sec = args[:gpu_sec] if args.key?(:gpu_sec)
886
+ @gpu_type = args[:gpu_type] if args.key?(:gpu_type)
887
+ @machine_spec = args[:machine_spec] if args.key?(:machine_spec)
888
+ @tracking_labels = args[:tracking_labels] if args.key?(:tracking_labels)
889
+ end
890
+ end
638
891
 
639
- # Moderate the document for harmful and sensitive categories.
640
- # Corresponds to the JSON property `moderateText`
641
- # @return [Boolean]
642
- attr_accessor :moderate_text
643
- alias_method :moderate_text?, :moderate_text
892
+ # Infra Usage of billing metrics. Next ID: 6
893
+ class InfraUsage
894
+ include Google::Apis::Core::Hashable
895
+
896
+ # Aggregated core metrics since requested start_time.
897
+ # Corresponds to the JSON property `cpuMetrics`
898
+ # @return [Array<Google::Apis::LanguageV1::CpuMetric>]
899
+ attr_accessor :cpu_metrics
900
+
901
+ # Aggregated persistent disk metrics since requested start_time.
902
+ # Corresponds to the JSON property `diskMetrics`
903
+ # @return [Array<Google::Apis::LanguageV1::DiskMetric>]
904
+ attr_accessor :disk_metrics
905
+
906
+ # Aggregated gpu metrics since requested start_time.
907
+ # Corresponds to the JSON property `gpuMetrics`
908
+ # @return [Array<Google::Apis::LanguageV1::GpuMetric>]
909
+ attr_accessor :gpu_metrics
910
+
911
+ # Aggregated ram metrics since requested start_time.
912
+ # Corresponds to the JSON property `ramMetrics`
913
+ # @return [Array<Google::Apis::LanguageV1::RamMetric>]
914
+ attr_accessor :ram_metrics
915
+
916
+ # Aggregated tpu metrics since requested start_time.
917
+ # Corresponds to the JSON property `tpuMetrics`
918
+ # @return [Array<Google::Apis::LanguageV1::TpuMetric>]
919
+ attr_accessor :tpu_metrics
644
920
 
645
921
  def initialize(**args)
646
922
  update!(**args)
@@ -648,13 +924,11 @@ module Google
648
924
 
649
925
  # Update properties of this object
650
926
  def update!(**args)
651
- @classification_model_options = args[:classification_model_options] if args.key?(:classification_model_options)
652
- @classify_text = args[:classify_text] if args.key?(:classify_text)
653
- @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
654
- @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
655
- @extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment)
656
- @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
657
- @moderate_text = args[:moderate_text] if args.key?(:moderate_text)
927
+ @cpu_metrics = args[:cpu_metrics] if args.key?(:cpu_metrics)
928
+ @disk_metrics = args[:disk_metrics] if args.key?(:disk_metrics)
929
+ @gpu_metrics = args[:gpu_metrics] if args.key?(:gpu_metrics)
930
+ @ram_metrics = args[:ram_metrics] if args.key?(:ram_metrics)
931
+ @tpu_metrics = args[:tpu_metrics] if args.key?(:tpu_metrics)
658
932
  end
659
933
  end
660
934
 
@@ -782,6 +1056,53 @@ module Google
782
1056
  end
783
1057
  end
784
1058
 
1059
+ #
1060
+ class RamMetric
1061
+ include Google::Apis::Core::Hashable
1062
+
1063
+ # Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type to match
1064
+ # billing metrics definition.
1065
+ # Corresponds to the JSON property `gibSec`
1066
+ # @return [Fixnum]
1067
+ attr_accessor :gib_sec
1068
+
1069
+ # Required. Machine spec, e.g. N1_STANDARD_4.
1070
+ # Corresponds to the JSON property `machineSpec`
1071
+ # @return [String]
1072
+ attr_accessor :machine_spec
1073
+
1074
+ # Required. VM memory in gb.
1075
+ # Corresponds to the JSON property `memories`
1076
+ # @return [Float]
1077
+ attr_accessor :memories
1078
+
1079
+ # Required. Type of ram.
1080
+ # Corresponds to the JSON property `ramType`
1081
+ # @return [String]
1082
+ attr_accessor :ram_type
1083
+
1084
+ # Billing tracking labels. They do not contain any user data but only the labels
1085
+ # set by Vertex Core Infra itself. Tracking labels' keys are defined with
1086
+ # special format: goog-[\p`Ll`\p`N`]+ E.g. "key": "goog-k8s-cluster-name","value"
1087
+ # : "us-east1-b4rk"
1088
+ # Corresponds to the JSON property `trackingLabels`
1089
+ # @return [Hash<String,String>]
1090
+ attr_accessor :tracking_labels
1091
+
1092
+ def initialize(**args)
1093
+ update!(**args)
1094
+ end
1095
+
1096
+ # Update properties of this object
1097
+ def update!(**args)
1098
+ @gib_sec = args[:gib_sec] if args.key?(:gib_sec)
1099
+ @machine_spec = args[:machine_spec] if args.key?(:machine_spec)
1100
+ @memories = args[:memories] if args.key?(:memories)
1101
+ @ram_type = args[:ram_type] if args.key?(:ram_type)
1102
+ @tracking_labels = args[:tracking_labels] if args.key?(:tracking_labels)
1103
+ end
1104
+ end
1105
+
785
1106
  # Represents a sentence in the input document.
786
1107
  class Sentence
787
1108
  include Google::Apis::Core::Hashable
@@ -937,27 +1258,44 @@ module Google
937
1258
  end
938
1259
  end
939
1260
 
940
- # Options for the V1 model.
941
- class V1Model
1261
+ #
1262
+ class TpuMetric
942
1263
  include Google::Apis::Core::Hashable
943
1264
 
1265
+ # Required. Seconds of TPU usage, e.g. 3600.
1266
+ # Corresponds to the JSON property `tpuSec`
1267
+ # @return [Fixnum]
1268
+ attr_accessor :tpu_sec
1269
+
1270
+ # Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.
1271
+ # Corresponds to the JSON property `tpuType`
1272
+ # @return [String]
1273
+ attr_accessor :tpu_type
1274
+
944
1275
  def initialize(**args)
945
1276
  update!(**args)
946
1277
  end
947
1278
 
948
1279
  # Update properties of this object
949
1280
  def update!(**args)
1281
+ @tpu_sec = args[:tpu_sec] if args.key?(:tpu_sec)
1282
+ @tpu_type = args[:tpu_type] if args.key?(:tpu_type)
950
1283
  end
951
1284
  end
952
1285
 
953
- # Options for the V2 model.
954
- class V2Model
1286
+ # The data statistics of a series of ARRAY values.
1287
+ class XpsArrayStats
955
1288
  include Google::Apis::Core::Hashable
956
1289
 
957
- # The content categories used for classification.
958
- # Corresponds to the JSON property `contentCategoriesVersion`
959
- # @return [String]
960
- attr_accessor :content_categories_version
1290
+ # Common statistics for a column with a specified data type.
1291
+ # Corresponds to the JSON property `commonStats`
1292
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
1293
+ attr_accessor :common_stats
1294
+
1295
+ # The data statistics of a series of values that share the same DataType.
1296
+ # Corresponds to the JSON property `memberStats`
1297
+ # @return [Google::Apis::LanguageV1::XpsDataStats]
1298
+ attr_accessor :member_stats
961
1299
 
962
1300
  def initialize(**args)
963
1301
  update!(**args)
@@ -965,7 +1303,4187 @@ module Google
965
1303
 
966
1304
  # Update properties of this object
967
1305
  def update!(**args)
968
- @content_categories_version = args[:content_categories_version] if args.key?(:content_categories_version)
1306
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
1307
+ @member_stats = args[:member_stats] if args.key?(:member_stats)
1308
+ end
1309
+ end
1310
+
1311
+ #
1312
+ class XpsBatchPredictResponse
1313
+ include Google::Apis::Core::Hashable
1314
+
1315
+ # Set of examples or input sources.
1316
+ # Corresponds to the JSON property `exampleSet`
1317
+ # @return [Google::Apis::LanguageV1::XpsExampleSet]
1318
+ attr_accessor :example_set
1319
+
1320
+ def initialize(**args)
1321
+ update!(**args)
1322
+ end
1323
+
1324
+ # Update properties of this object
1325
+ def update!(**args)
1326
+ @example_set = args[:example_set] if args.key?(:example_set)
1327
+ end
1328
+ end
1329
+
1330
+ # Bounding box matching model metrics for a single intersection-over-union
1331
+ # threshold and multiple label match confidence thresholds.
1332
+ class XpsBoundingBoxMetricsEntry
1333
+ include Google::Apis::Core::Hashable
1334
+
1335
+ # Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,
1336
+ # 0.97,0.98,0.99.
1337
+ # Corresponds to the JSON property `confidenceMetricsEntries`
1338
+ # @return [Array<Google::Apis::LanguageV1::XpsBoundingBoxMetricsEntryConfidenceMetricsEntry>]
1339
+ attr_accessor :confidence_metrics_entries
1340
+
1341
+ # The intersection-over-union threshold value used to compute this metrics entry.
1342
+ # Corresponds to the JSON property `iouThreshold`
1343
+ # @return [Float]
1344
+ attr_accessor :iou_threshold
1345
+
1346
+ # The mean average precision.
1347
+ # Corresponds to the JSON property `meanAveragePrecision`
1348
+ # @return [Float]
1349
+ attr_accessor :mean_average_precision
1350
+
1351
+ def initialize(**args)
1352
+ update!(**args)
1353
+ end
1354
+
1355
+ # Update properties of this object
1356
+ def update!(**args)
1357
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
1358
+ @iou_threshold = args[:iou_threshold] if args.key?(:iou_threshold)
1359
+ @mean_average_precision = args[:mean_average_precision] if args.key?(:mean_average_precision)
1360
+ end
1361
+ end
1362
+
1363
+ # Metrics for a single confidence threshold.
1364
+ class XpsBoundingBoxMetricsEntryConfidenceMetricsEntry
1365
+ include Google::Apis::Core::Hashable
1366
+
1367
+ # The confidence threshold value used to compute the metrics.
1368
+ # Corresponds to the JSON property `confidenceThreshold`
1369
+ # @return [Float]
1370
+ attr_accessor :confidence_threshold
1371
+
1372
+ # The harmonic mean of recall and precision.
1373
+ # Corresponds to the JSON property `f1Score`
1374
+ # @return [Float]
1375
+ attr_accessor :f1_score
1376
+
1377
+ # Precision for the given confidence threshold.
1378
+ # Corresponds to the JSON property `precision`
1379
+ # @return [Float]
1380
+ attr_accessor :precision
1381
+
1382
+ # Recall for the given confidence threshold.
1383
+ # Corresponds to the JSON property `recall`
1384
+ # @return [Float]
1385
+ attr_accessor :recall
1386
+
1387
+ def initialize(**args)
1388
+ update!(**args)
1389
+ end
1390
+
1391
+ # Update properties of this object
1392
+ def update!(**args)
1393
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
1394
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
1395
+ @precision = args[:precision] if args.key?(:precision)
1396
+ @recall = args[:recall] if args.key?(:recall)
1397
+ end
1398
+ end
1399
+
1400
+ # The data statistics of a series of CATEGORY values.
1401
+ class XpsCategoryStats
1402
+ include Google::Apis::Core::Hashable
1403
+
1404
+ # Common statistics for a column with a specified data type.
1405
+ # Corresponds to the JSON property `commonStats`
1406
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
1407
+ attr_accessor :common_stats
1408
+
1409
+ # The statistics of the top 20 CATEGORY values, ordered by CategoryStats.
1410
+ # SingleCategoryStats.count.
1411
+ # Corresponds to the JSON property `topCategoryStats`
1412
+ # @return [Array<Google::Apis::LanguageV1::XpsCategoryStatsSingleCategoryStats>]
1413
+ attr_accessor :top_category_stats
1414
+
1415
+ def initialize(**args)
1416
+ update!(**args)
1417
+ end
1418
+
1419
+ # Update properties of this object
1420
+ def update!(**args)
1421
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
1422
+ @top_category_stats = args[:top_category_stats] if args.key?(:top_category_stats)
1423
+ end
1424
+ end
1425
+
1426
+ # The statistics of a single CATEGORY value.
1427
+ class XpsCategoryStatsSingleCategoryStats
1428
+ include Google::Apis::Core::Hashable
1429
+
1430
+ # The number of occurrences of this value in the series.
1431
+ # Corresponds to the JSON property `count`
1432
+ # @return [Fixnum]
1433
+ attr_accessor :count
1434
+
1435
+ # The CATEGORY value.
1436
+ # Corresponds to the JSON property `value`
1437
+ # @return [String]
1438
+ attr_accessor :value
1439
+
1440
+ def initialize(**args)
1441
+ update!(**args)
1442
+ end
1443
+
1444
+ # Update properties of this object
1445
+ def update!(**args)
1446
+ @count = args[:count] if args.key?(:count)
1447
+ @value = args[:value] if args.key?(:value)
1448
+ end
1449
+ end
1450
+
1451
+ # Model evaluation metrics for classification problems. It can be used for image
1452
+ # and video classification. Next tag: 9.
1453
+ class XpsClassificationEvaluationMetrics
1454
+ include Google::Apis::Core::Hashable
1455
+
1456
+ # The Area under precision recall curve metric.
1457
+ # Corresponds to the JSON property `auPrc`
1458
+ # @return [Float]
1459
+ attr_accessor :au_prc
1460
+
1461
+ # The Area Under Receiver Operating Characteristic curve metric. Micro-averaged
1462
+ # for the overall evaluation.
1463
+ # Corresponds to the JSON property `auRoc`
1464
+ # @return [Float]
1465
+ attr_accessor :au_roc
1466
+
1467
+ # The Area under precision recall curve metric based on priors.
1468
+ # Corresponds to the JSON property `baseAuPrc`
1469
+ # @return [Float]
1470
+ attr_accessor :base_au_prc
1471
+
1472
+ # Metrics that have confidence thresholds. Precision-recall curve can be derived
1473
+ # from it.
1474
+ # Corresponds to the JSON property `confidenceMetricsEntries`
1475
+ # @return [Array<Google::Apis::LanguageV1::XpsConfidenceMetricsEntry>]
1476
+ attr_accessor :confidence_metrics_entries
1477
+
1478
+ # Confusion matrix of the model running the classification.
1479
+ # Corresponds to the JSON property `confusionMatrix`
1480
+ # @return [Google::Apis::LanguageV1::XpsConfusionMatrix]
1481
+ attr_accessor :confusion_matrix
1482
+
1483
+ # The number of examples used for model evaluation.
1484
+ # Corresponds to the JSON property `evaluatedExamplesCount`
1485
+ # @return [Fixnum]
1486
+ attr_accessor :evaluated_examples_count
1487
+
1488
+ # The Log Loss metric.
1489
+ # Corresponds to the JSON property `logLoss`
1490
+ # @return [Float]
1491
+ attr_accessor :log_loss
1492
+
1493
+ def initialize(**args)
1494
+ update!(**args)
1495
+ end
1496
+
1497
+ # Update properties of this object
1498
+ def update!(**args)
1499
+ @au_prc = args[:au_prc] if args.key?(:au_prc)
1500
+ @au_roc = args[:au_roc] if args.key?(:au_roc)
1501
+ @base_au_prc = args[:base_au_prc] if args.key?(:base_au_prc)
1502
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
1503
+ @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
1504
+ @evaluated_examples_count = args[:evaluated_examples_count] if args.key?(:evaluated_examples_count)
1505
+ @log_loss = args[:log_loss] if args.key?(:log_loss)
1506
+ end
1507
+ end
1508
+
1509
+ # Map from color to display name. Will only be used by Image Segmentation for
1510
+ # uCAIP.
1511
+ class XpsColorMap
1512
+ include Google::Apis::Core::Hashable
1513
+
1514
+ # Should be used during training.
1515
+ # Corresponds to the JSON property `annotationSpecIdToken`
1516
+ # @return [String]
1517
+ attr_accessor :annotation_spec_id_token
1518
+
1519
+ # Represents a color in the RGBA color space. This representation is designed
1520
+ # for simplicity of conversion to and from color representations in various
1521
+ # languages over compactness. For example, the fields of this representation can
1522
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1523
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1524
+ # method in iOS; and, with just a little work, it can be easily formatted into a
1525
+ # CSS `rgba()` string in JavaScript. This reference page doesn't have
1526
+ # information about the absolute color space that should be used to interpret
1527
+ # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
1528
+ # applications should assume the sRGB color space. When color equality needs to
1529
+ # be decided, implementations, unless documented otherwise, treat two colors as
1530
+ # equal if all their red, green, blue, and alpha values each differ by at most `
1531
+ # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
1532
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1533
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1534
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1535
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1536
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1537
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1538
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1539
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1540
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1541
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1542
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1543
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1544
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1545
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1546
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1547
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1548
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1549
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1550
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1551
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1552
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1553
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1554
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1555
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1556
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1557
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1558
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1559
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1560
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1561
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1562
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1563
+ # / ...
1564
+ # Corresponds to the JSON property `color`
1565
+ # @return [Google::Apis::LanguageV1::Color]
1566
+ attr_accessor :color
1567
+
1568
+ # Should be used during preprocessing.
1569
+ # Corresponds to the JSON property `displayName`
1570
+ # @return [String]
1571
+ attr_accessor :display_name
1572
+
1573
+ # RGB color and each channel is represented by an integer.
1574
+ # Corresponds to the JSON property `intColor`
1575
+ # @return [Google::Apis::LanguageV1::XpsColorMapIntColor]
1576
+ attr_accessor :int_color
1577
+
1578
+ def initialize(**args)
1579
+ update!(**args)
1580
+ end
1581
+
1582
+ # Update properties of this object
1583
+ def update!(**args)
1584
+ @annotation_spec_id_token = args[:annotation_spec_id_token] if args.key?(:annotation_spec_id_token)
1585
+ @color = args[:color] if args.key?(:color)
1586
+ @display_name = args[:display_name] if args.key?(:display_name)
1587
+ @int_color = args[:int_color] if args.key?(:int_color)
1588
+ end
1589
+ end
1590
+
1591
+ # RGB color and each channel is represented by an integer.
1592
+ class XpsColorMapIntColor
1593
+ include Google::Apis::Core::Hashable
1594
+
1595
+ # The value should be in range of [0, 255].
1596
+ # Corresponds to the JSON property `blue`
1597
+ # @return [Fixnum]
1598
+ attr_accessor :blue
1599
+
1600
+ # The value should be in range of [0, 255].
1601
+ # Corresponds to the JSON property `green`
1602
+ # @return [Fixnum]
1603
+ attr_accessor :green
1604
+
1605
+ # The value should be in range of [0, 255].
1606
+ # Corresponds to the JSON property `red`
1607
+ # @return [Fixnum]
1608
+ attr_accessor :red
1609
+
1610
+ def initialize(**args)
1611
+ update!(**args)
1612
+ end
1613
+
1614
+ # Update properties of this object
1615
+ def update!(**args)
1616
+ @blue = args[:blue] if args.key?(:blue)
1617
+ @green = args[:green] if args.key?(:green)
1618
+ @red = args[:red] if args.key?(:red)
1619
+ end
1620
+ end
1621
+
1622
+ #
1623
+ class XpsColumnSpec
1624
+ include Google::Apis::Core::Hashable
1625
+
1626
+ # The unique id of the column. When Preprocess, the Tables BE will popuate the
1627
+ # order id of the column, which reflects the order of the column inside the
1628
+ # table, i.e. 0 means the first column in the table, N-1 means the last column.
1629
+ # AutoML BE will persist this order id in Spanner and set the order id here when
1630
+ # calling RefreshTablesStats and Train. Note: it's different than the
1631
+ # column_spec_id that is generated in AutoML BE.
1632
+ # Corresponds to the JSON property `columnId`
1633
+ # @return [Fixnum]
1634
+ attr_accessor :column_id
1635
+
1636
+ # The data statistics of a series of values that share the same DataType.
1637
+ # Corresponds to the JSON property `dataStats`
1638
+ # @return [Google::Apis::LanguageV1::XpsDataStats]
1639
+ attr_accessor :data_stats
1640
+
1641
+ # Indicated the type of data that can be stored in a structured data entity (e.g.
1642
+ # a table).
1643
+ # Corresponds to the JSON property `dataType`
1644
+ # @return [Google::Apis::LanguageV1::XpsDataType]
1645
+ attr_accessor :data_type
1646
+
1647
+ # The display name of the column. It's outputed in Preprocess and a required
1648
+ # input for RefreshTablesStats and Train.
1649
+ # Corresponds to the JSON property `displayName`
1650
+ # @return [String]
1651
+ attr_accessor :display_name
1652
+
1653
+ # =========================================================================== #
1654
+ # The fields below are used exclusively for Forecasting.
1655
+ # Corresponds to the JSON property `forecastingMetadata`
1656
+ # @return [Google::Apis::LanguageV1::XpsColumnSpecForecastingMetadata]
1657
+ attr_accessor :forecasting_metadata
1658
+
1659
+ # It's outputed in RefreshTablesStats, and a required input in Train.
1660
+ # Corresponds to the JSON property `topCorrelatedColumns`
1661
+ # @return [Array<Google::Apis::LanguageV1::XpsColumnSpecCorrelatedColumn>]
1662
+ attr_accessor :top_correlated_columns
1663
+
1664
+ def initialize(**args)
1665
+ update!(**args)
1666
+ end
1667
+
1668
+ # Update properties of this object
1669
+ def update!(**args)
1670
+ @column_id = args[:column_id] if args.key?(:column_id)
1671
+ @data_stats = args[:data_stats] if args.key?(:data_stats)
1672
+ @data_type = args[:data_type] if args.key?(:data_type)
1673
+ @display_name = args[:display_name] if args.key?(:display_name)
1674
+ @forecasting_metadata = args[:forecasting_metadata] if args.key?(:forecasting_metadata)
1675
+ @top_correlated_columns = args[:top_correlated_columns] if args.key?(:top_correlated_columns)
1676
+ end
1677
+ end
1678
+
1679
+ # Identifies a table's column, and its correlation with the column this
1680
+ # ColumnSpec describes.
1681
+ class XpsColumnSpecCorrelatedColumn
1682
+ include Google::Apis::Core::Hashable
1683
+
1684
+ #
1685
+ # Corresponds to the JSON property `columnId`
1686
+ # @return [Fixnum]
1687
+ attr_accessor :column_id
1688
+
1689
+ # A correlation statistics between two series of DataType values. The series may
1690
+ # have differing DataType-s, but within a single series the DataType must be the
1691
+ # same.
1692
+ # Corresponds to the JSON property `correlationStats`
1693
+ # @return [Google::Apis::LanguageV1::XpsCorrelationStats]
1694
+ attr_accessor :correlation_stats
1695
+
1696
+ def initialize(**args)
1697
+ update!(**args)
1698
+ end
1699
+
1700
+ # Update properties of this object
1701
+ def update!(**args)
1702
+ @column_id = args[:column_id] if args.key?(:column_id)
1703
+ @correlation_stats = args[:correlation_stats] if args.key?(:correlation_stats)
1704
+ end
1705
+ end
1706
+
1707
+ # =========================================================================== #
1708
+ # The fields below are used exclusively for Forecasting.
1709
+ class XpsColumnSpecForecastingMetadata
1710
+ include Google::Apis::Core::Hashable
1711
+
1712
+ # The type of the column for FORECASTING model training purposes.
1713
+ # Corresponds to the JSON property `columnType`
1714
+ # @return [String]
1715
+ attr_accessor :column_type
1716
+
1717
+ def initialize(**args)
1718
+ update!(**args)
1719
+ end
1720
+
1721
+ # Update properties of this object
1722
+ def update!(**args)
1723
+ @column_type = args[:column_type] if args.key?(:column_type)
1724
+ end
1725
+ end
1726
+
1727
+ # Common statistics for a column with a specified data type.
1728
+ class XpsCommonStats
1729
+ include Google::Apis::Core::Hashable
1730
+
1731
+ #
1732
+ # Corresponds to the JSON property `distinctValueCount`
1733
+ # @return [Fixnum]
1734
+ attr_accessor :distinct_value_count
1735
+
1736
+ #
1737
+ # Corresponds to the JSON property `nullValueCount`
1738
+ # @return [Fixnum]
1739
+ attr_accessor :null_value_count
1740
+
1741
+ #
1742
+ # Corresponds to the JSON property `validValueCount`
1743
+ # @return [Fixnum]
1744
+ attr_accessor :valid_value_count
1745
+
1746
+ def initialize(**args)
1747
+ update!(**args)
1748
+ end
1749
+
1750
+ # Update properties of this object
1751
+ def update!(**args)
1752
+ @distinct_value_count = args[:distinct_value_count] if args.key?(:distinct_value_count)
1753
+ @null_value_count = args[:null_value_count] if args.key?(:null_value_count)
1754
+ @valid_value_count = args[:valid_value_count] if args.key?(:valid_value_count)
1755
+ end
1756
+ end
1757
+
1758
+ # ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next
1759
+ # tag: 16.
1760
+ class XpsConfidenceMetricsEntry
1761
+ include Google::Apis::Core::Hashable
1762
+
1763
+ # Metrics are computed with an assumption that the model never return
1764
+ # predictions with score lower than this value.
1765
+ # Corresponds to the JSON property `confidenceThreshold`
1766
+ # @return [Float]
1767
+ attr_accessor :confidence_threshold
1768
+
1769
+ # The harmonic mean of recall and precision.
1770
+ # Corresponds to the JSON property `f1Score`
1771
+ # @return [Float]
1772
+ attr_accessor :f1_score
1773
+
1774
+ # The harmonic mean of recall_at1 and precision_at1.
1775
+ # Corresponds to the JSON property `f1ScoreAt1`
1776
+ # @return [Float]
1777
+ attr_accessor :f1_score_at1
1778
+
1779
+ # The number of ground truth labels that are not matched by a model created
1780
+ # label.
1781
+ # Corresponds to the JSON property `falseNegativeCount`
1782
+ # @return [Fixnum]
1783
+ attr_accessor :false_negative_count
1784
+
1785
+ # The number of model created labels that do not match a ground truth label.
1786
+ # Corresponds to the JSON property `falsePositiveCount`
1787
+ # @return [Fixnum]
1788
+ attr_accessor :false_positive_count
1789
+
1790
+ # False Positive Rate for the given confidence threshold.
1791
+ # Corresponds to the JSON property `falsePositiveRate`
1792
+ # @return [Float]
1793
+ attr_accessor :false_positive_rate
1794
+
1795
+ # The False Positive Rate when only considering the label that has the highest
1796
+ # prediction score and not below the confidence threshold for each example.
1797
+ # Corresponds to the JSON property `falsePositiveRateAt1`
1798
+ # @return [Float]
1799
+ attr_accessor :false_positive_rate_at1
1800
+
1801
+ # Metrics are computed with an assumption that the model always returns at most
1802
+ # this many predictions (ordered by their score, descendingly), but they all
1803
+ # still need to meet the confidence_threshold.
1804
+ # Corresponds to the JSON property `positionThreshold`
1805
+ # @return [Fixnum]
1806
+ attr_accessor :position_threshold
1807
+
1808
+ # Precision for the given confidence threshold.
1809
+ # Corresponds to the JSON property `precision`
1810
+ # @return [Float]
1811
+ attr_accessor :precision
1812
+
1813
+ # The precision when only considering the label that has the highest prediction
1814
+ # score and not below the confidence threshold for each example.
1815
+ # Corresponds to the JSON property `precisionAt1`
1816
+ # @return [Float]
1817
+ attr_accessor :precision_at1
1818
+
1819
+ # Recall (true positive rate) for the given confidence threshold.
1820
+ # Corresponds to the JSON property `recall`
1821
+ # @return [Float]
1822
+ attr_accessor :recall
1823
+
1824
+ # The recall (true positive rate) when only considering the label that has the
1825
+ # highest prediction score and not below the confidence threshold for each
1826
+ # example.
1827
+ # Corresponds to the JSON property `recallAt1`
1828
+ # @return [Float]
1829
+ attr_accessor :recall_at1
1830
+
1831
+ # The number of labels that were not created by the model, but if they would,
1832
+ # they would not match a ground truth label.
1833
+ # Corresponds to the JSON property `trueNegativeCount`
1834
+ # @return [Fixnum]
1835
+ attr_accessor :true_negative_count
1836
+
1837
+ # The number of model created labels that match a ground truth label.
1838
+ # Corresponds to the JSON property `truePositiveCount`
1839
+ # @return [Fixnum]
1840
+ attr_accessor :true_positive_count
1841
+
1842
+ def initialize(**args)
1843
+ update!(**args)
1844
+ end
1845
+
1846
+ # Update properties of this object
1847
+ def update!(**args)
1848
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
1849
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
1850
+ @f1_score_at1 = args[:f1_score_at1] if args.key?(:f1_score_at1)
1851
+ @false_negative_count = args[:false_negative_count] if args.key?(:false_negative_count)
1852
+ @false_positive_count = args[:false_positive_count] if args.key?(:false_positive_count)
1853
+ @false_positive_rate = args[:false_positive_rate] if args.key?(:false_positive_rate)
1854
+ @false_positive_rate_at1 = args[:false_positive_rate_at1] if args.key?(:false_positive_rate_at1)
1855
+ @position_threshold = args[:position_threshold] if args.key?(:position_threshold)
1856
+ @precision = args[:precision] if args.key?(:precision)
1857
+ @precision_at1 = args[:precision_at1] if args.key?(:precision_at1)
1858
+ @recall = args[:recall] if args.key?(:recall)
1859
+ @recall_at1 = args[:recall_at1] if args.key?(:recall_at1)
1860
+ @true_negative_count = args[:true_negative_count] if args.key?(:true_negative_count)
1861
+ @true_positive_count = args[:true_positive_count] if args.key?(:true_positive_count)
1862
+ end
1863
+ end
1864
+
1865
+ # Confusion matrix of the model running the classification.
1866
+ class XpsConfusionMatrix
1867
+ include Google::Apis::Core::Hashable
1868
+
1869
+ # For the following three repeated fields, only one is intended to be set.
1870
+ # annotation_spec_id_token is preferable to be set. ID tokens of the annotation
1871
+ # specs used in the confusion matrix.
1872
+ # Corresponds to the JSON property `annotationSpecIdToken`
1873
+ # @return [Array<String>]
1874
+ attr_accessor :annotation_spec_id_token
1875
+
1876
+ # Category (mainly for segmentation). Set only for image segmentation models.
1877
+ # Note: uCAIP Image Segmentation should use annotation_spec_id_token.
1878
+ # Corresponds to the JSON property `category`
1879
+ # @return [Array<Fixnum>]
1880
+ attr_accessor :category
1881
+
1882
+ # Rows in the confusion matrix. The number of rows is equal to the size of `
1883
+ # annotation_spec_id_token`. `row[i].value[j]` is the number of examples that
1884
+ # have ground truth of the `annotation_spec_id_token[i]` and are predicted as `
1885
+ # annotation_spec_id_token[j]` by the model being evaluated.
1886
+ # Corresponds to the JSON property `row`
1887
+ # @return [Array<Google::Apis::LanguageV1::XpsConfusionMatrixRow>]
1888
+ attr_accessor :row
1889
+
1890
+ # Sentiment labels used in the confusion matrix. Set only for text sentiment
1891
+ # models. For AutoML Text Revamp, use `annotation_spec_id_token` instead and
1892
+ # leave this field empty.
1893
+ # Corresponds to the JSON property `sentimentLabel`
1894
+ # @return [Array<Fixnum>]
1895
+ attr_accessor :sentiment_label
1896
+
1897
+ def initialize(**args)
1898
+ update!(**args)
1899
+ end
1900
+
1901
+ # Update properties of this object
1902
+ def update!(**args)
1903
+ @annotation_spec_id_token = args[:annotation_spec_id_token] if args.key?(:annotation_spec_id_token)
1904
+ @category = args[:category] if args.key?(:category)
1905
+ @row = args[:row] if args.key?(:row)
1906
+ @sentiment_label = args[:sentiment_label] if args.key?(:sentiment_label)
1907
+ end
1908
+ end
1909
+
1910
+ # A row in the confusion matrix.
1911
+ class XpsConfusionMatrixRow
1912
+ include Google::Apis::Core::Hashable
1913
+
1914
+ # Same as above except intended to represent other counts (for e.g. for
1915
+ # segmentation this is pixel count). NOTE(params): Only example_count or count
1916
+ # is set (oneoff does not support repeated fields unless they are embedded
1917
+ # inside another message).
1918
+ # Corresponds to the JSON property `count`
1919
+ # @return [Array<Fixnum>]
1920
+ attr_accessor :count
1921
+
1922
+ # Value of the specific cell in the confusion matrix. The number of values each
1923
+ # row has (i.e. the length of the row) is equal to the length of the
1924
+ # annotation_spec_id_token field.
1925
+ # Corresponds to the JSON property `exampleCount`
1926
+ # @return [Array<Fixnum>]
1927
+ attr_accessor :example_count
1928
+
1929
+ def initialize(**args)
1930
+ update!(**args)
1931
+ end
1932
+
1933
+ # Update properties of this object
1934
+ def update!(**args)
1935
+ @count = args[:count] if args.key?(:count)
1936
+ @example_count = args[:example_count] if args.key?(:example_count)
1937
+ end
1938
+ end
1939
+
1940
+ # A model format used for iOS mobile devices.
1941
+ class XpsCoreMlFormat
1942
+ include Google::Apis::Core::Hashable
1943
+
1944
+ def initialize(**args)
1945
+ update!(**args)
1946
+ end
1947
+
1948
+ # Update properties of this object
1949
+ def update!(**args)
1950
+ end
1951
+ end
1952
+
1953
+ # A correlation statistics between two series of DataType values. The series may
1954
+ # have differing DataType-s, but within a single series the DataType must be the
1955
+ # same.
1956
+ class XpsCorrelationStats
1957
+ include Google::Apis::Core::Hashable
1958
+
1959
+ # The correlation value using the Cramer's V measure.
1960
+ # Corresponds to the JSON property `cramersV`
1961
+ # @return [Float]
1962
+ attr_accessor :cramers_v
1963
+
1964
+ def initialize(**args)
1965
+ update!(**args)
1966
+ end
1967
+
1968
+ # Update properties of this object
1969
+ def update!(**args)
1970
+ @cramers_v = args[:cramers_v] if args.key?(:cramers_v)
1971
+ end
1972
+ end
1973
+
1974
+ # Different types of errors and the stats associatesd with each error.
1975
+ class XpsDataErrors
1976
+ include Google::Apis::Core::Hashable
1977
+
1978
+ # Number of records having errors associated with the enum.
1979
+ # Corresponds to the JSON property `count`
1980
+ # @return [Fixnum]
1981
+ attr_accessor :count
1982
+
1983
+ # Type of the error.
1984
+ # Corresponds to the JSON property `errorType`
1985
+ # @return [String]
1986
+ attr_accessor :error_type
1987
+
1988
+ def initialize(**args)
1989
+ update!(**args)
1990
+ end
1991
+
1992
+ # Update properties of this object
1993
+ def update!(**args)
1994
+ @count = args[:count] if args.key?(:count)
1995
+ @error_type = args[:error_type] if args.key?(:error_type)
1996
+ end
1997
+ end
1998
+
1999
+ # The data statistics of a series of values that share the same DataType.
2000
+ class XpsDataStats
2001
+ include Google::Apis::Core::Hashable
2002
+
2003
+ # The data statistics of a series of ARRAY values.
2004
+ # Corresponds to the JSON property `arrayStats`
2005
+ # @return [Google::Apis::LanguageV1::XpsArrayStats]
2006
+ attr_accessor :array_stats
2007
+
2008
+ # The data statistics of a series of CATEGORY values.
2009
+ # Corresponds to the JSON property `categoryStats`
2010
+ # @return [Google::Apis::LanguageV1::XpsCategoryStats]
2011
+ attr_accessor :category_stats
2012
+
2013
+ # The number of distinct values.
2014
+ # Corresponds to the JSON property `distinctValueCount`
2015
+ # @return [Fixnum]
2016
+ attr_accessor :distinct_value_count
2017
+
2018
+ # The data statistics of a series of FLOAT64 values.
2019
+ # Corresponds to the JSON property `float64Stats`
2020
+ # @return [Google::Apis::LanguageV1::XpsFloat64Stats]
2021
+ attr_accessor :float64_stats
2022
+
2023
+ # The number of values that are null.
2024
+ # Corresponds to the JSON property `nullValueCount`
2025
+ # @return [Fixnum]
2026
+ attr_accessor :null_value_count
2027
+
2028
+ # The data statistics of a series of STRING values.
2029
+ # Corresponds to the JSON property `stringStats`
2030
+ # @return [Google::Apis::LanguageV1::XpsStringStats]
2031
+ attr_accessor :string_stats
2032
+
2033
+ # The data statistics of a series of STRUCT values.
2034
+ # Corresponds to the JSON property `structStats`
2035
+ # @return [Google::Apis::LanguageV1::XpsStructStats]
2036
+ attr_accessor :struct_stats
2037
+
2038
+ # The data statistics of a series of TIMESTAMP values.
2039
+ # Corresponds to the JSON property `timestampStats`
2040
+ # @return [Google::Apis::LanguageV1::XpsTimestampStats]
2041
+ attr_accessor :timestamp_stats
2042
+
2043
+ # The number of values that are valid.
2044
+ # Corresponds to the JSON property `validValueCount`
2045
+ # @return [Fixnum]
2046
+ attr_accessor :valid_value_count
2047
+
2048
+ def initialize(**args)
2049
+ update!(**args)
2050
+ end
2051
+
2052
+ # Update properties of this object
2053
+ def update!(**args)
2054
+ @array_stats = args[:array_stats] if args.key?(:array_stats)
2055
+ @category_stats = args[:category_stats] if args.key?(:category_stats)
2056
+ @distinct_value_count = args[:distinct_value_count] if args.key?(:distinct_value_count)
2057
+ @float64_stats = args[:float64_stats] if args.key?(:float64_stats)
2058
+ @null_value_count = args[:null_value_count] if args.key?(:null_value_count)
2059
+ @string_stats = args[:string_stats] if args.key?(:string_stats)
2060
+ @struct_stats = args[:struct_stats] if args.key?(:struct_stats)
2061
+ @timestamp_stats = args[:timestamp_stats] if args.key?(:timestamp_stats)
2062
+ @valid_value_count = args[:valid_value_count] if args.key?(:valid_value_count)
2063
+ end
2064
+ end
2065
+
2066
+ # Indicated the type of data that can be stored in a structured data entity (e.g.
2067
+ # a table).
2068
+ class XpsDataType
2069
+ include Google::Apis::Core::Hashable
2070
+
2071
+ # The highly compatible data types to this data type.
2072
+ # Corresponds to the JSON property `compatibleDataTypes`
2073
+ # @return [Array<Google::Apis::LanguageV1::XpsDataType>]
2074
+ attr_accessor :compatible_data_types
2075
+
2076
+ # Indicated the type of data that can be stored in a structured data entity (e.g.
2077
+ # a table).
2078
+ # Corresponds to the JSON property `listElementType`
2079
+ # @return [Google::Apis::LanguageV1::XpsDataType]
2080
+ attr_accessor :list_element_type
2081
+
2082
+ # If true, this DataType can also be `null`.
2083
+ # Corresponds to the JSON property `nullable`
2084
+ # @return [Boolean]
2085
+ attr_accessor :nullable
2086
+ alias_method :nullable?, :nullable
2087
+
2088
+ # `StructType` defines the DataType-s of a STRUCT type.
2089
+ # Corresponds to the JSON property `structType`
2090
+ # @return [Google::Apis::LanguageV1::XpsStructType]
2091
+ attr_accessor :struct_type
2092
+
2093
+ # If type_code == TIMESTAMP then `time_format` provides the format in which that
2094
+ # time field is expressed. The time_format must be written in `strftime` syntax.
2095
+ # If time_format is not set, then the default format as described on the field
2096
+ # is used.
2097
+ # Corresponds to the JSON property `timeFormat`
2098
+ # @return [String]
2099
+ attr_accessor :time_format
2100
+
2101
+ # Required. The TypeCode for this type.
2102
+ # Corresponds to the JSON property `typeCode`
2103
+ # @return [String]
2104
+ attr_accessor :type_code
2105
+
2106
+ def initialize(**args)
2107
+ update!(**args)
2108
+ end
2109
+
2110
+ # Update properties of this object
2111
+ def update!(**args)
2112
+ @compatible_data_types = args[:compatible_data_types] if args.key?(:compatible_data_types)
2113
+ @list_element_type = args[:list_element_type] if args.key?(:list_element_type)
2114
+ @nullable = args[:nullable] if args.key?(:nullable)
2115
+ @struct_type = args[:struct_type] if args.key?(:struct_type)
2116
+ @time_format = args[:time_format] if args.key?(:time_format)
2117
+ @type_code = args[:type_code] if args.key?(:type_code)
2118
+ end
2119
+ end
2120
+
2121
+ # A model format used for Docker containers. Use the params field to customize
2122
+ # the container. The container is verified to work correctly on ubuntu 16.04
2123
+ # operating system.
2124
+ class XpsDockerFormat
2125
+ include Google::Apis::Core::Hashable
2126
+
2127
+ # Optional. Additional cpu information describing the requirements for the to be
2128
+ # exported model files.
2129
+ # Corresponds to the JSON property `cpuArchitecture`
2130
+ # @return [String]
2131
+ attr_accessor :cpu_architecture
2132
+
2133
+ # Optional. Additional gpu information describing the requirements for the to be
2134
+ # exported model files.
2135
+ # Corresponds to the JSON property `gpuArchitecture`
2136
+ # @return [String]
2137
+ attr_accessor :gpu_architecture
2138
+
2139
+ def initialize(**args)
2140
+ update!(**args)
2141
+ end
2142
+
2143
+ # Update properties of this object
2144
+ def update!(**args)
2145
+ @cpu_architecture = args[:cpu_architecture] if args.key?(:cpu_architecture)
2146
+ @gpu_architecture = args[:gpu_architecture] if args.key?(:gpu_architecture)
2147
+ end
2148
+ end
2149
+
2150
+ # A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
2151
+ class XpsEdgeTpuTfLiteFormat
2152
+ include Google::Apis::Core::Hashable
2153
+
2154
+ def initialize(**args)
2155
+ update!(**args)
2156
+ end
2157
+
2158
+ # Update properties of this object
2159
+ def update!(**args)
2160
+ end
2161
+ end
2162
+
2163
+ # Contains xPS-specific model evaluation metrics either for a single annotation
2164
+ # spec (label), or for the model overall. Next tag: 18.
2165
+ class XpsEvaluationMetrics
2166
+ include Google::Apis::Core::Hashable
2167
+
2168
+ # The annotation_spec for which this evaluation metrics instance had been
2169
+ # created. Empty iff this is an overall model evaluation (like Tables evaluation
2170
+ # metrics), i.e. aggregated across all labels. The value comes from the input
2171
+ # annotations in AnnotatedExample. For MVP product or for text sentiment models
2172
+ # where annotation_spec_id_token is not available, set label instead.
2173
+ # Corresponds to the JSON property `annotationSpecIdToken`
2174
+ # @return [String]
2175
+ attr_accessor :annotation_spec_id_token
2176
+
2177
+ # The integer category label for which this evaluation metric instance had been
2178
+ # created. Valid categories are 0 or higher. Overall model evaluation should set
2179
+ # this to negative values (rather than implicit zero). Only used for Image
2180
+ # Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP
2181
+ # Image Segmentation should use annotation_spec_id_token.
2182
+ # Corresponds to the JSON property `category`
2183
+ # @return [Fixnum]
2184
+ attr_accessor :category
2185
+
2186
+ # The number of examples used to create this evaluation metrics instance.
2187
+ # Corresponds to the JSON property `evaluatedExampleCount`
2188
+ # @return [Fixnum]
2189
+ attr_accessor :evaluated_example_count
2190
+
2191
+ # Model evaluation metrics for classification problems. It can be used for image
2192
+ # and video classification. Next tag: 9.
2193
+ # Corresponds to the JSON property `imageClassificationEvalMetrics`
2194
+ # @return [Google::Apis::LanguageV1::XpsClassificationEvaluationMetrics]
2195
+ attr_accessor :image_classification_eval_metrics
2196
+
2197
+ # Model evaluation metrics for image object detection problems. Evaluates
2198
+ # prediction quality of labeled bounding boxes.
2199
+ # Corresponds to the JSON property `imageObjectDetectionEvalMetrics`
2200
+ # @return [Google::Apis::LanguageV1::XpsImageObjectDetectionEvaluationMetrics]
2201
+ attr_accessor :image_object_detection_eval_metrics
2202
+
2203
+ # Model evaluation metrics for image segmentation problems. Next tag: 4.
2204
+ # Corresponds to the JSON property `imageSegmentationEvalMetrics`
2205
+ # @return [Google::Apis::LanguageV1::XpsImageSegmentationEvaluationMetrics]
2206
+ attr_accessor :image_segmentation_eval_metrics
2207
+
2208
+ # The label for which this evaluation metrics instance had been created. Empty
2209
+ # iff this is an overall model evaluation (like Tables evaluation metrics), i.e.
2210
+ # aggregated across all labels. The label maps to AnnotationSpec.display_name in
2211
+ # Public API protos. Only used by MVP implementation and text sentiment FULL
2212
+ # implementation.
2213
+ # Corresponds to the JSON property `label`
2214
+ # @return [String]
2215
+ attr_accessor :label
2216
+
2217
+ # Model evaluation metrics for regression problems. It can be used for Tables.
2218
+ # Corresponds to the JSON property `regressionEvalMetrics`
2219
+ # @return [Google::Apis::LanguageV1::XpsRegressionEvaluationMetrics]
2220
+ attr_accessor :regression_eval_metrics
2221
+
2222
+ # Model evaluation metrics for classification problems. It can be used for image
2223
+ # and video classification. Next tag: 9.
2224
+ # Corresponds to the JSON property `tablesClassificationEvalMetrics`
2225
+ # @return [Google::Apis::LanguageV1::XpsClassificationEvaluationMetrics]
2226
+ attr_accessor :tables_classification_eval_metrics
2227
+
2228
+ #
2229
+ # Corresponds to the JSON property `tablesEvalMetrics`
2230
+ # @return [Google::Apis::LanguageV1::XpsTablesEvaluationMetrics]
2231
+ attr_accessor :tables_eval_metrics
2232
+
2233
+ # Model evaluation metrics for classification problems. It can be used for image
2234
+ # and video classification. Next tag: 9.
2235
+ # Corresponds to the JSON property `textClassificationEvalMetrics`
2236
+ # @return [Google::Apis::LanguageV1::XpsClassificationEvaluationMetrics]
2237
+ attr_accessor :text_classification_eval_metrics
2238
+
2239
+ #
2240
+ # Corresponds to the JSON property `textExtractionEvalMetrics`
2241
+ # @return [Google::Apis::LanguageV1::XpsTextExtractionEvaluationMetrics]
2242
+ attr_accessor :text_extraction_eval_metrics
2243
+
2244
+ # Model evaluation metrics for text sentiment problems.
2245
+ # Corresponds to the JSON property `textSentimentEvalMetrics`
2246
+ # @return [Google::Apis::LanguageV1::XpsTextSentimentEvaluationMetrics]
2247
+ attr_accessor :text_sentiment_eval_metrics
2248
+
2249
+ # Evaluation metrics for the dataset.
2250
+ # Corresponds to the JSON property `translationEvalMetrics`
2251
+ # @return [Google::Apis::LanguageV1::XpsTranslationEvaluationMetrics]
2252
+ attr_accessor :translation_eval_metrics
2253
+
2254
+ # Model evaluation metrics for video action recognition.
2255
+ # Corresponds to the JSON property `videoActionRecognitionEvalMetrics`
2256
+ # @return [Google::Apis::LanguageV1::XpsVideoActionRecognitionEvaluationMetrics]
2257
+ attr_accessor :video_action_recognition_eval_metrics
2258
+
2259
+ # Model evaluation metrics for classification problems. It can be used for image
2260
+ # and video classification. Next tag: 9.
2261
+ # Corresponds to the JSON property `videoClassificationEvalMetrics`
2262
+ # @return [Google::Apis::LanguageV1::XpsClassificationEvaluationMetrics]
2263
+ attr_accessor :video_classification_eval_metrics
2264
+
2265
+ # Model evaluation metrics for ObjectTracking problems. Next tag: 10.
2266
+ # Corresponds to the JSON property `videoObjectTrackingEvalMetrics`
2267
+ # @return [Google::Apis::LanguageV1::XpsVideoObjectTrackingEvaluationMetrics]
2268
+ attr_accessor :video_object_tracking_eval_metrics
2269
+
2270
+ def initialize(**args)
2271
+ update!(**args)
2272
+ end
2273
+
2274
+ # Update properties of this object
2275
+ def update!(**args)
2276
+ @annotation_spec_id_token = args[:annotation_spec_id_token] if args.key?(:annotation_spec_id_token)
2277
+ @category = args[:category] if args.key?(:category)
2278
+ @evaluated_example_count = args[:evaluated_example_count] if args.key?(:evaluated_example_count)
2279
+ @image_classification_eval_metrics = args[:image_classification_eval_metrics] if args.key?(:image_classification_eval_metrics)
2280
+ @image_object_detection_eval_metrics = args[:image_object_detection_eval_metrics] if args.key?(:image_object_detection_eval_metrics)
2281
+ @image_segmentation_eval_metrics = args[:image_segmentation_eval_metrics] if args.key?(:image_segmentation_eval_metrics)
2282
+ @label = args[:label] if args.key?(:label)
2283
+ @regression_eval_metrics = args[:regression_eval_metrics] if args.key?(:regression_eval_metrics)
2284
+ @tables_classification_eval_metrics = args[:tables_classification_eval_metrics] if args.key?(:tables_classification_eval_metrics)
2285
+ @tables_eval_metrics = args[:tables_eval_metrics] if args.key?(:tables_eval_metrics)
2286
+ @text_classification_eval_metrics = args[:text_classification_eval_metrics] if args.key?(:text_classification_eval_metrics)
2287
+ @text_extraction_eval_metrics = args[:text_extraction_eval_metrics] if args.key?(:text_extraction_eval_metrics)
2288
+ @text_sentiment_eval_metrics = args[:text_sentiment_eval_metrics] if args.key?(:text_sentiment_eval_metrics)
2289
+ @translation_eval_metrics = args[:translation_eval_metrics] if args.key?(:translation_eval_metrics)
2290
+ @video_action_recognition_eval_metrics = args[:video_action_recognition_eval_metrics] if args.key?(:video_action_recognition_eval_metrics)
2291
+ @video_classification_eval_metrics = args[:video_classification_eval_metrics] if args.key?(:video_classification_eval_metrics)
2292
+ @video_object_tracking_eval_metrics = args[:video_object_tracking_eval_metrics] if args.key?(:video_object_tracking_eval_metrics)
2293
+ end
2294
+ end
2295
+
2296
+ # Specifies location of model evaluation metrics.
2297
+ class XpsEvaluationMetricsSet
2298
+ include Google::Apis::Core::Hashable
2299
+
2300
+ # Inline EvaluationMetrics - should be relatively small. For passing large
2301
+ # quantities of exhaustive metrics, use file_spec.
2302
+ # Corresponds to the JSON property `evaluationMetrics`
2303
+ # @return [Array<Google::Apis::LanguageV1::XpsEvaluationMetrics>]
2304
+ attr_accessor :evaluation_metrics
2305
+
2306
+ # Spec of input and output files, on external file systems (CNS, GCS, etc).
2307
+ # Corresponds to the JSON property `fileSpec`
2308
+ # @return [Google::Apis::LanguageV1::XpsFileSpec]
2309
+ attr_accessor :file_spec
2310
+
2311
+ # Number of the evaluation metrics (usually one per label plus overall).
2312
+ # Corresponds to the JSON property `numEvaluationMetrics`
2313
+ # @return [Fixnum]
2314
+ attr_accessor :num_evaluation_metrics
2315
+
2316
+ def initialize(**args)
2317
+ update!(**args)
2318
+ end
2319
+
2320
+ # Update properties of this object
2321
+ def update!(**args)
2322
+ @evaluation_metrics = args[:evaluation_metrics] if args.key?(:evaluation_metrics)
2323
+ @file_spec = args[:file_spec] if args.key?(:file_spec)
2324
+ @num_evaluation_metrics = args[:num_evaluation_metrics] if args.key?(:num_evaluation_metrics)
2325
+ end
2326
+ end
2327
+
2328
+ # Set of examples or input sources.
2329
+ class XpsExampleSet
2330
+ include Google::Apis::Core::Hashable
2331
+
2332
+ # Spec of input and output files, on external file systems (CNS, GCS, etc).
2333
+ # Corresponds to the JSON property `fileSpec`
2334
+ # @return [Google::Apis::LanguageV1::XpsFileSpec]
2335
+ attr_accessor :file_spec
2336
+
2337
+ # Fingerprint of the example set.
2338
+ # Corresponds to the JSON property `fingerprint`
2339
+ # @return [Fixnum]
2340
+ attr_accessor :fingerprint
2341
+
2342
+ # Number of examples.
2343
+ # Corresponds to the JSON property `numExamples`
2344
+ # @return [Fixnum]
2345
+ attr_accessor :num_examples
2346
+
2347
+ # Number of input sources.
2348
+ # Corresponds to the JSON property `numInputSources`
2349
+ # @return [Fixnum]
2350
+ attr_accessor :num_input_sources
2351
+
2352
+ def initialize(**args)
2353
+ update!(**args)
2354
+ end
2355
+
2356
+ # Update properties of this object
2357
+ def update!(**args)
2358
+ @file_spec = args[:file_spec] if args.key?(:file_spec)
2359
+ @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
2360
+ @num_examples = args[:num_examples] if args.key?(:num_examples)
2361
+ @num_input_sources = args[:num_input_sources] if args.key?(:num_input_sources)
2362
+ end
2363
+ end
2364
+
2365
+ #
2366
+ class XpsExportModelOutputConfig
2367
+ include Google::Apis::Core::Hashable
2368
+
2369
+ # A model format used for iOS mobile devices.
2370
+ # Corresponds to the JSON property `coreMlFormat`
2371
+ # @return [Google::Apis::LanguageV1::XpsCoreMlFormat]
2372
+ attr_accessor :core_ml_format
2373
+
2374
+ # A model format used for Docker containers. Use the params field to customize
2375
+ # the container. The container is verified to work correctly on ubuntu 16.04
2376
+ # operating system.
2377
+ # Corresponds to the JSON property `dockerFormat`
2378
+ # @return [Google::Apis::LanguageV1::XpsDockerFormat]
2379
+ attr_accessor :docker_format
2380
+
2381
+ # A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
2382
+ # Corresponds to the JSON property `edgeTpuTfLiteFormat`
2383
+ # @return [Google::Apis::LanguageV1::XpsEdgeTpuTfLiteFormat]
2384
+ attr_accessor :edge_tpu_tf_lite_format
2385
+
2386
+ # For any model and format: If true, will additionally export
2387
+ # FirebaseExportedModelInfo in a firebase.txt file.
2388
+ # Corresponds to the JSON property `exportFirebaseAuxiliaryInfo`
2389
+ # @return [Boolean]
2390
+ attr_accessor :export_firebase_auxiliary_info
2391
+ alias_method :export_firebase_auxiliary_info?, :export_firebase_auxiliary_info
2392
+
2393
+ # The Google Contained Registry (GCR) path the exported files to be pushed to.
2394
+ # This location is set if the exported format is DOCKDER.
2395
+ # Corresponds to the JSON property `outputGcrUri`
2396
+ # @return [String]
2397
+ attr_accessor :output_gcr_uri
2398
+
2399
+ # The Google Cloud Storage (GCS) directory where XPS will output the exported
2400
+ # models and related files. Format: gs://bucket/directory
2401
+ # Corresponds to the JSON property `outputGcsUri`
2402
+ # @return [String]
2403
+ attr_accessor :output_gcs_uri
2404
+
2405
+ # A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the
2406
+ # browser and in Node.js using JavaScript.
2407
+ # Corresponds to the JSON property `tfJsFormat`
2408
+ # @return [Google::Apis::LanguageV1::XpsTfJsFormat]
2409
+ attr_accessor :tf_js_format
2410
+
2411
+ # LINT.IfChange A model format used for mobile and IoT devices. See https://www.
2412
+ # tensorflow.org/lite.
2413
+ # Corresponds to the JSON property `tfLiteFormat`
2414
+ # @return [Google::Apis::LanguageV1::XpsTfLiteFormat]
2415
+ attr_accessor :tf_lite_format
2416
+
2417
+ # A tensorflow model format in SavedModel format.
2418
+ # Corresponds to the JSON property `tfSavedModelFormat`
2419
+ # @return [Google::Apis::LanguageV1::XpsTfSavedModelFormat]
2420
+ attr_accessor :tf_saved_model_format
2421
+
2422
+ def initialize(**args)
2423
+ update!(**args)
2424
+ end
2425
+
2426
+ # Update properties of this object
2427
+ def update!(**args)
2428
+ @core_ml_format = args[:core_ml_format] if args.key?(:core_ml_format)
2429
+ @docker_format = args[:docker_format] if args.key?(:docker_format)
2430
+ @edge_tpu_tf_lite_format = args[:edge_tpu_tf_lite_format] if args.key?(:edge_tpu_tf_lite_format)
2431
+ @export_firebase_auxiliary_info = args[:export_firebase_auxiliary_info] if args.key?(:export_firebase_auxiliary_info)
2432
+ @output_gcr_uri = args[:output_gcr_uri] if args.key?(:output_gcr_uri)
2433
+ @output_gcs_uri = args[:output_gcs_uri] if args.key?(:output_gcs_uri)
2434
+ @tf_js_format = args[:tf_js_format] if args.key?(:tf_js_format)
2435
+ @tf_lite_format = args[:tf_lite_format] if args.key?(:tf_lite_format)
2436
+ @tf_saved_model_format = args[:tf_saved_model_format] if args.key?(:tf_saved_model_format)
2437
+ end
2438
+ end
2439
+
2440
+ # Spec of input and output files, on external file systems (CNS, GCS, etc).
2441
+ class XpsFileSpec
2442
+ include Google::Apis::Core::Hashable
2443
+
2444
+ # Deprecated. Use file_spec.
2445
+ # Corresponds to the JSON property `directoryPath`
2446
+ # @return [String]
2447
+ attr_accessor :directory_path
2448
+
2449
+ #
2450
+ # Corresponds to the JSON property `fileFormat`
2451
+ # @return [String]
2452
+ attr_accessor :file_format
2453
+
2454
+ # Single file path, or file pattern of format "/path/to/file@shard_count". E.g. /
2455
+ # cns/cell-d/somewhere/file@2 is expanded to two files: /cns/cell-d/somewhere/
2456
+ # file-00000-of-00002 and /cns/cell-d/somewhere/file-00001-of-00002.
2457
+ # Corresponds to the JSON property `fileSpec`
2458
+ # @return [String]
2459
+ attr_accessor :file_spec
2460
+
2461
+ # Deprecated. Use file_spec.
2462
+ # Corresponds to the JSON property `singleFilePath`
2463
+ # @return [String]
2464
+ attr_accessor :single_file_path
2465
+
2466
+ def initialize(**args)
2467
+ update!(**args)
2468
+ end
2469
+
2470
+ # Update properties of this object
2471
+ def update!(**args)
2472
+ @directory_path = args[:directory_path] if args.key?(:directory_path)
2473
+ @file_format = args[:file_format] if args.key?(:file_format)
2474
+ @file_spec = args[:file_spec] if args.key?(:file_spec)
2475
+ @single_file_path = args[:single_file_path] if args.key?(:single_file_path)
2476
+ end
2477
+ end
2478
+
2479
+ # The data statistics of a series of FLOAT64 values.
2480
+ class XpsFloat64Stats
2481
+ include Google::Apis::Core::Hashable
2482
+
2483
+ # Common statistics for a column with a specified data type.
2484
+ # Corresponds to the JSON property `commonStats`
2485
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
2486
+ attr_accessor :common_stats
2487
+
2488
+ # Histogram buckets of the data series. Sorted by the min value of the bucket,
2489
+ # ascendingly, and the number of the buckets is dynamically generated. The
2490
+ # buckets are non-overlapping and completely cover whole FLOAT64 range with min
2491
+ # of first bucket being `"-Infinity"`, and max of the last one being `"Infinity"`
2492
+ # .
2493
+ # Corresponds to the JSON property `histogramBuckets`
2494
+ # @return [Array<Google::Apis::LanguageV1::XpsFloat64StatsHistogramBucket>]
2495
+ attr_accessor :histogram_buckets
2496
+
2497
+ # The mean of the series.
2498
+ # Corresponds to the JSON property `mean`
2499
+ # @return [Float]
2500
+ attr_accessor :mean
2501
+
2502
+ # Ordered from 0 to k k-quantile values of the data series of n values. The
2503
+ # value at index i is, approximately, the i*n/k-th smallest value in the series;
2504
+ # for i = 0 and i = k these are, respectively, the min and max values.
2505
+ # Corresponds to the JSON property `quantiles`
2506
+ # @return [Array<Float>]
2507
+ attr_accessor :quantiles
2508
+
2509
+ # The standard deviation of the series.
2510
+ # Corresponds to the JSON property `standardDeviation`
2511
+ # @return [Float]
2512
+ attr_accessor :standard_deviation
2513
+
2514
+ def initialize(**args)
2515
+ update!(**args)
2516
+ end
2517
+
2518
+ # Update properties of this object
2519
+ def update!(**args)
2520
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
2521
+ @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets)
2522
+ @mean = args[:mean] if args.key?(:mean)
2523
+ @quantiles = args[:quantiles] if args.key?(:quantiles)
2524
+ @standard_deviation = args[:standard_deviation] if args.key?(:standard_deviation)
2525
+ end
2526
+ end
2527
+
2528
+ # A bucket of a histogram.
2529
+ class XpsFloat64StatsHistogramBucket
2530
+ include Google::Apis::Core::Hashable
2531
+
2532
+ # The number of data values that are in the bucket, i.e. are between min and max
2533
+ # values.
2534
+ # Corresponds to the JSON property `count`
2535
+ # @return [Fixnum]
2536
+ attr_accessor :count
2537
+
2538
+ # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in which
2539
+ # case it's inclusive.
2540
+ # Corresponds to the JSON property `max`
2541
+ # @return [Float]
2542
+ attr_accessor :max
2543
+
2544
+ # The minimum value of the bucket, inclusive.
2545
+ # Corresponds to the JSON property `min`
2546
+ # @return [Float]
2547
+ attr_accessor :min
2548
+
2549
+ def initialize(**args)
2550
+ update!(**args)
2551
+ end
2552
+
2553
+ # Update properties of this object
2554
+ def update!(**args)
2555
+ @count = args[:count] if args.key?(:count)
2556
+ @max = args[:max] if args.key?(:max)
2557
+ @min = args[:min] if args.key?(:min)
2558
+ end
2559
+ end
2560
+
2561
+ #
2562
+ class XpsImageClassificationTrainResponse
2563
+ include Google::Apis::Core::Hashable
2564
+
2565
+ # Total number of classes.
2566
+ # Corresponds to the JSON property `classCount`
2567
+ # @return [Fixnum]
2568
+ attr_accessor :class_count
2569
+
2570
+ # Information of downloadable models that are pre-generated as part of training
2571
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
2572
+ # request from user, AutoMl backend can serve the pre-generated models to user
2573
+ # if exists (by copying the files from internal path to user provided location),
2574
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
2575
+ # on the fly with the requesting format.
2576
+ # Corresponds to the JSON property `exportModelSpec`
2577
+ # @return [Google::Apis::LanguageV1::XpsImageExportModelSpec]
2578
+ attr_accessor :export_model_spec
2579
+
2580
+ # Stores the locations and related metadata of the model artifacts. Populated
2581
+ # for uCAIP requests only.
2582
+ # Corresponds to the JSON property `modelArtifactSpec`
2583
+ # @return [Google::Apis::LanguageV1::XpsImageModelArtifactSpec]
2584
+ attr_accessor :model_artifact_spec
2585
+
2586
+ # Serving specification for image models.
2587
+ # Corresponds to the JSON property `modelServingSpec`
2588
+ # @return [Google::Apis::LanguageV1::XpsImageModelServingSpec]
2589
+ attr_accessor :model_serving_spec
2590
+
2591
+ # Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', '
2592
+ # MODEL_EARLY_STOPPED'.
2593
+ # Corresponds to the JSON property `stopReason`
2594
+ # @return [String]
2595
+ attr_accessor :stop_reason
2596
+
2597
+ # The actual cost to create this model. - For edge type model, the cost is
2598
+ # expressed in node hour. - For cloud type model,the cost is expressed in
2599
+ # compute hour. - Populated for models created before GA. To be deprecated after
2600
+ # GA.
2601
+ # Corresponds to the JSON property `trainCostInNodeTime`
2602
+ # @return [String]
2603
+ attr_accessor :train_cost_in_node_time
2604
+
2605
+ # The actual training cost, expressed in node seconds. Populated for models
2606
+ # trained in node time.
2607
+ # Corresponds to the JSON property `trainCostNodeSeconds`
2608
+ # @return [Fixnum]
2609
+ attr_accessor :train_cost_node_seconds
2610
+
2611
+ def initialize(**args)
2612
+ update!(**args)
2613
+ end
2614
+
2615
+ # Update properties of this object
2616
+ def update!(**args)
2617
+ @class_count = args[:class_count] if args.key?(:class_count)
2618
+ @export_model_spec = args[:export_model_spec] if args.key?(:export_model_spec)
2619
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
2620
+ @model_serving_spec = args[:model_serving_spec] if args.key?(:model_serving_spec)
2621
+ @stop_reason = args[:stop_reason] if args.key?(:stop_reason)
2622
+ @train_cost_in_node_time = args[:train_cost_in_node_time] if args.key?(:train_cost_in_node_time)
2623
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
2624
+ end
2625
+ end
2626
+
2627
+ # Information of downloadable models that are pre-generated as part of training
2628
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
2629
+ # request from user, AutoMl backend can serve the pre-generated models to user
2630
+ # if exists (by copying the files from internal path to user provided location),
2631
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
2632
+ # on the fly with the requesting format.
2633
+ class XpsImageExportModelSpec
2634
+ include Google::Apis::Core::Hashable
2635
+
2636
+ # Contains the model format and internal location of the model files to be
2637
+ # exported/downloaded. Use the GCS bucket name which is provided via
2638
+ # TrainRequest.gcs_bucket_name to store the model files.
2639
+ # Corresponds to the JSON property `exportModelOutputConfig`
2640
+ # @return [Array<Google::Apis::LanguageV1::XpsExportModelOutputConfig>]
2641
+ attr_accessor :export_model_output_config
2642
+
2643
+ def initialize(**args)
2644
+ update!(**args)
2645
+ end
2646
+
2647
+ # Update properties of this object
2648
+ def update!(**args)
2649
+ @export_model_output_config = args[:export_model_output_config] if args.key?(:export_model_output_config)
2650
+ end
2651
+ end
2652
+
2653
+ # Stores the locations and related metadata of the model artifacts. Populated
2654
+ # for uCAIP requests only.
2655
+ class XpsImageModelArtifactSpec
2656
+ include Google::Apis::Core::Hashable
2657
+
2658
+ # A single model artifact item.
2659
+ # Corresponds to the JSON property `checkpointArtifact`
2660
+ # @return [Google::Apis::LanguageV1::XpsModelArtifactItem]
2661
+ attr_accessor :checkpoint_artifact
2662
+
2663
+ # The model binary files in different formats for model export.
2664
+ # Corresponds to the JSON property `exportArtifact`
2665
+ # @return [Array<Google::Apis::LanguageV1::XpsModelArtifactItem>]
2666
+ attr_accessor :export_artifact
2667
+
2668
+ # GCS uri of decoded labels file for model export 'dict.txt'.
2669
+ # Corresponds to the JSON property `labelGcsUri`
2670
+ # @return [String]
2671
+ attr_accessor :label_gcs_uri
2672
+
2673
+ # A single model artifact item.
2674
+ # Corresponds to the JSON property `servingArtifact`
2675
+ # @return [Google::Apis::LanguageV1::XpsModelArtifactItem]
2676
+ attr_accessor :serving_artifact
2677
+
2678
+ # GCS uri prefix of Tensorflow JavaScript binary files 'groupX-shardXofX.bin'
2679
+ # Deprecated.
2680
+ # Corresponds to the JSON property `tfJsBinaryGcsPrefix`
2681
+ # @return [String]
2682
+ attr_accessor :tf_js_binary_gcs_prefix
2683
+
2684
+ # GCS uri of Tensorflow Lite metadata 'tflite_metadata.json'.
2685
+ # Corresponds to the JSON property `tfLiteMetadataGcsUri`
2686
+ # @return [String]
2687
+ attr_accessor :tf_lite_metadata_gcs_uri
2688
+
2689
+ def initialize(**args)
2690
+ update!(**args)
2691
+ end
2692
+
2693
+ # Update properties of this object
2694
+ def update!(**args)
2695
+ @checkpoint_artifact = args[:checkpoint_artifact] if args.key?(:checkpoint_artifact)
2696
+ @export_artifact = args[:export_artifact] if args.key?(:export_artifact)
2697
+ @label_gcs_uri = args[:label_gcs_uri] if args.key?(:label_gcs_uri)
2698
+ @serving_artifact = args[:serving_artifact] if args.key?(:serving_artifact)
2699
+ @tf_js_binary_gcs_prefix = args[:tf_js_binary_gcs_prefix] if args.key?(:tf_js_binary_gcs_prefix)
2700
+ @tf_lite_metadata_gcs_uri = args[:tf_lite_metadata_gcs_uri] if args.key?(:tf_lite_metadata_gcs_uri)
2701
+ end
2702
+ end
2703
+
2704
+ # Serving specification for image models.
2705
+ class XpsImageModelServingSpec
2706
+ include Google::Apis::Core::Hashable
2707
+
2708
+ # Populate under uCAIP request scope.
2709
+ # Corresponds to the JSON property `modelThroughputEstimation`
2710
+ # @return [Array<Google::Apis::LanguageV1::XpsImageModelServingSpecModelThroughputEstimation>]
2711
+ attr_accessor :model_throughput_estimation
2712
+
2713
+ # An estimated value of how much traffic a node can serve. Populated for AutoMl
2714
+ # request only.
2715
+ # Corresponds to the JSON property `nodeQps`
2716
+ # @return [Float]
2717
+ attr_accessor :node_qps
2718
+
2719
+ # ## The fields below are only populated under uCAIP request scope. https://
2720
+ # cloud.google.com/ml-engine/docs/runtime-version-list
2721
+ # Corresponds to the JSON property `tfRuntimeVersion`
2722
+ # @return [String]
2723
+ attr_accessor :tf_runtime_version
2724
+
2725
+ def initialize(**args)
2726
+ update!(**args)
2727
+ end
2728
+
2729
+ # Update properties of this object
2730
+ def update!(**args)
2731
+ @model_throughput_estimation = args[:model_throughput_estimation] if args.key?(:model_throughput_estimation)
2732
+ @node_qps = args[:node_qps] if args.key?(:node_qps)
2733
+ @tf_runtime_version = args[:tf_runtime_version] if args.key?(:tf_runtime_version)
2734
+ end
2735
+ end
2736
+
2737
+ #
2738
+ class XpsImageModelServingSpecModelThroughputEstimation
2739
+ include Google::Apis::Core::Hashable
2740
+
2741
+ #
2742
+ # Corresponds to the JSON property `computeEngineAcceleratorType`
2743
+ # @return [String]
2744
+ attr_accessor :compute_engine_accelerator_type
2745
+
2746
+ # Estimated latency.
2747
+ # Corresponds to the JSON property `latencyInMilliseconds`
2748
+ # @return [Float]
2749
+ attr_accessor :latency_in_milliseconds
2750
+
2751
+ # The approximate qps a deployed node can serve.
2752
+ # Corresponds to the JSON property `nodeQps`
2753
+ # @return [Float]
2754
+ attr_accessor :node_qps
2755
+
2756
+ #
2757
+ # Corresponds to the JSON property `servomaticPartitionType`
2758
+ # @return [String]
2759
+ attr_accessor :servomatic_partition_type
2760
+
2761
+ def initialize(**args)
2762
+ update!(**args)
2763
+ end
2764
+
2765
+ # Update properties of this object
2766
+ def update!(**args)
2767
+ @compute_engine_accelerator_type = args[:compute_engine_accelerator_type] if args.key?(:compute_engine_accelerator_type)
2768
+ @latency_in_milliseconds = args[:latency_in_milliseconds] if args.key?(:latency_in_milliseconds)
2769
+ @node_qps = args[:node_qps] if args.key?(:node_qps)
2770
+ @servomatic_partition_type = args[:servomatic_partition_type] if args.key?(:servomatic_partition_type)
2771
+ end
2772
+ end
2773
+
2774
+ # Model evaluation metrics for image object detection problems. Evaluates
2775
+ # prediction quality of labeled bounding boxes.
2776
+ class XpsImageObjectDetectionEvaluationMetrics
2777
+ include Google::Apis::Core::Hashable
2778
+
2779
+ # The single metric for bounding boxes evaluation: the mean_average_precision
2780
+ # averaged over all bounding_box_metrics_entries.
2781
+ # Corresponds to the JSON property `boundingBoxMeanAveragePrecision`
2782
+ # @return [Float]
2783
+ attr_accessor :bounding_box_mean_average_precision
2784
+
2785
+ # The bounding boxes match metrics for each Intersection-over-union threshold 0.
2786
+ # 05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,
2787
+ # 0.10,...,0.95,0.96,0.97,0.98,0.99 pair.
2788
+ # Corresponds to the JSON property `boundingBoxMetricsEntries`
2789
+ # @return [Array<Google::Apis::LanguageV1::XpsBoundingBoxMetricsEntry>]
2790
+ attr_accessor :bounding_box_metrics_entries
2791
+
2792
+ # The total number of bounding boxes (i.e. summed over all images) the ground
2793
+ # truth used to create this evaluation had.
2794
+ # Corresponds to the JSON property `evaluatedBoundingBoxCount`
2795
+ # @return [Fixnum]
2796
+ attr_accessor :evaluated_bounding_box_count
2797
+
2798
+ def initialize(**args)
2799
+ update!(**args)
2800
+ end
2801
+
2802
+ # Update properties of this object
2803
+ def update!(**args)
2804
+ @bounding_box_mean_average_precision = args[:bounding_box_mean_average_precision] if args.key?(:bounding_box_mean_average_precision)
2805
+ @bounding_box_metrics_entries = args[:bounding_box_metrics_entries] if args.key?(:bounding_box_metrics_entries)
2806
+ @evaluated_bounding_box_count = args[:evaluated_bounding_box_count] if args.key?(:evaluated_bounding_box_count)
2807
+ end
2808
+ end
2809
+
2810
+ #
2811
+ class XpsImageObjectDetectionModelSpec
2812
+ include Google::Apis::Core::Hashable
2813
+
2814
+ # Total number of classes.
2815
+ # Corresponds to the JSON property `classCount`
2816
+ # @return [Fixnum]
2817
+ attr_accessor :class_count
2818
+
2819
+ # Information of downloadable models that are pre-generated as part of training
2820
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
2821
+ # request from user, AutoMl backend can serve the pre-generated models to user
2822
+ # if exists (by copying the files from internal path to user provided location),
2823
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
2824
+ # on the fly with the requesting format.
2825
+ # Corresponds to the JSON property `exportModelSpec`
2826
+ # @return [Google::Apis::LanguageV1::XpsImageExportModelSpec]
2827
+ attr_accessor :export_model_spec
2828
+
2829
+ # Max number of bounding box.
2830
+ # Corresponds to the JSON property `maxBoundingBoxCount`
2831
+ # @return [Fixnum]
2832
+ attr_accessor :max_bounding_box_count
2833
+
2834
+ # Stores the locations and related metadata of the model artifacts. Populated
2835
+ # for uCAIP requests only.
2836
+ # Corresponds to the JSON property `modelArtifactSpec`
2837
+ # @return [Google::Apis::LanguageV1::XpsImageModelArtifactSpec]
2838
+ attr_accessor :model_artifact_spec
2839
+
2840
+ # Serving specification for image models.
2841
+ # Corresponds to the JSON property `modelServingSpec`
2842
+ # @return [Google::Apis::LanguageV1::XpsImageModelServingSpec]
2843
+ attr_accessor :model_serving_spec
2844
+
2845
+ # Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.
2846
+ # Corresponds to the JSON property `stopReason`
2847
+ # @return [String]
2848
+ attr_accessor :stop_reason
2849
+
2850
+ # The actual train cost of creating this model, expressed in node seconds, i.e.
2851
+ # 3,600 value in this field means 1 node hour.
2852
+ # Corresponds to the JSON property `trainCostNodeSeconds`
2853
+ # @return [Fixnum]
2854
+ attr_accessor :train_cost_node_seconds
2855
+
2856
+ def initialize(**args)
2857
+ update!(**args)
2858
+ end
2859
+
2860
+ # Update properties of this object
2861
+ def update!(**args)
2862
+ @class_count = args[:class_count] if args.key?(:class_count)
2863
+ @export_model_spec = args[:export_model_spec] if args.key?(:export_model_spec)
2864
+ @max_bounding_box_count = args[:max_bounding_box_count] if args.key?(:max_bounding_box_count)
2865
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
2866
+ @model_serving_spec = args[:model_serving_spec] if args.key?(:model_serving_spec)
2867
+ @stop_reason = args[:stop_reason] if args.key?(:stop_reason)
2868
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
2869
+ end
2870
+ end
2871
+
2872
+ # Model evaluation metrics for image segmentation problems. Next tag: 4.
2873
+ class XpsImageSegmentationEvaluationMetrics
2874
+ include Google::Apis::Core::Hashable
2875
+
2876
+ # Metrics that have confidence thresholds. Precision-recall curve can be derived
2877
+ # from it.
2878
+ # Corresponds to the JSON property `confidenceMetricsEntries`
2879
+ # @return [Array<Google::Apis::LanguageV1::XpsImageSegmentationEvaluationMetricsConfidenceMetricsEntry>]
2880
+ attr_accessor :confidence_metrics_entries
2881
+
2882
+ def initialize(**args)
2883
+ update!(**args)
2884
+ end
2885
+
2886
+ # Update properties of this object
2887
+ def update!(**args)
2888
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
2889
+ end
2890
+ end
2891
+
2892
+ # Metrics for a single confidence threshold.
2893
+ class XpsImageSegmentationEvaluationMetricsConfidenceMetricsEntry
2894
+ include Google::Apis::Core::Hashable
2895
+
2896
+ # The confidence threshold value used to compute the metrics.
2897
+ # Corresponds to the JSON property `confidenceThreshold`
2898
+ # @return [Float]
2899
+ attr_accessor :confidence_threshold
2900
+
2901
+ # Confusion matrix of the model running the classification.
2902
+ # Corresponds to the JSON property `confusionMatrix`
2903
+ # @return [Google::Apis::LanguageV1::XpsConfusionMatrix]
2904
+ attr_accessor :confusion_matrix
2905
+
2906
+ # DSC or the F1 score: The harmonic mean of recall and precision.
2907
+ # Corresponds to the JSON property `diceScoreCoefficient`
2908
+ # @return [Float]
2909
+ attr_accessor :dice_score_coefficient
2910
+
2911
+ # IOU score.
2912
+ # Corresponds to the JSON property `iouScore`
2913
+ # @return [Float]
2914
+ attr_accessor :iou_score
2915
+
2916
+ # Precision for the given confidence threshold.
2917
+ # Corresponds to the JSON property `precision`
2918
+ # @return [Float]
2919
+ attr_accessor :precision
2920
+
2921
+ # Recall for the given confidence threshold.
2922
+ # Corresponds to the JSON property `recall`
2923
+ # @return [Float]
2924
+ attr_accessor :recall
2925
+
2926
+ def initialize(**args)
2927
+ update!(**args)
2928
+ end
2929
+
2930
+ # Update properties of this object
2931
+ def update!(**args)
2932
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
2933
+ @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
2934
+ @dice_score_coefficient = args[:dice_score_coefficient] if args.key?(:dice_score_coefficient)
2935
+ @iou_score = args[:iou_score] if args.key?(:iou_score)
2936
+ @precision = args[:precision] if args.key?(:precision)
2937
+ @recall = args[:recall] if args.key?(:recall)
2938
+ end
2939
+ end
2940
+
2941
+ #
2942
+ class XpsImageSegmentationTrainResponse
2943
+ include Google::Apis::Core::Hashable
2944
+
2945
+ # Color map of the model.
2946
+ # Corresponds to the JSON property `colorMaps`
2947
+ # @return [Array<Google::Apis::LanguageV1::XpsColorMap>]
2948
+ attr_accessor :color_maps
2949
+
2950
+ # Information of downloadable models that are pre-generated as part of training
2951
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
2952
+ # request from user, AutoMl backend can serve the pre-generated models to user
2953
+ # if exists (by copying the files from internal path to user provided location),
2954
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
2955
+ # on the fly with the requesting format.
2956
+ # Corresponds to the JSON property `exportModelSpec`
2957
+ # @return [Google::Apis::LanguageV1::XpsImageExportModelSpec]
2958
+ attr_accessor :export_model_spec
2959
+
2960
+ # Stores the locations and related metadata of the model artifacts. Populated
2961
+ # for uCAIP requests only.
2962
+ # Corresponds to the JSON property `modelArtifactSpec`
2963
+ # @return [Google::Apis::LanguageV1::XpsImageModelArtifactSpec]
2964
+ attr_accessor :model_artifact_spec
2965
+
2966
+ # Serving specification for image models.
2967
+ # Corresponds to the JSON property `modelServingSpec`
2968
+ # @return [Google::Apis::LanguageV1::XpsImageModelServingSpec]
2969
+ attr_accessor :model_serving_spec
2970
+
2971
+ # Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.
2972
+ # Corresponds to the JSON property `stopReason`
2973
+ # @return [String]
2974
+ attr_accessor :stop_reason
2975
+
2976
+ # The actual train cost of creating this model, expressed in node seconds, i.e.
2977
+ # 3,600 value in this field means 1 node hour.
2978
+ # Corresponds to the JSON property `trainCostNodeSeconds`
2979
+ # @return [Fixnum]
2980
+ attr_accessor :train_cost_node_seconds
2981
+
2982
+ def initialize(**args)
2983
+ update!(**args)
2984
+ end
2985
+
2986
+ # Update properties of this object
2987
+ def update!(**args)
2988
+ @color_maps = args[:color_maps] if args.key?(:color_maps)
2989
+ @export_model_spec = args[:export_model_spec] if args.key?(:export_model_spec)
2990
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
2991
+ @model_serving_spec = args[:model_serving_spec] if args.key?(:model_serving_spec)
2992
+ @stop_reason = args[:stop_reason] if args.key?(:stop_reason)
2993
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
2994
+ end
2995
+ end
2996
+
2997
+ # An attribution method that computes the Aumann-Shapley value taking advantage
2998
+ # of the model's fully differentiable structure. Refer to this paper for more
2999
+ # details: https://arxiv.org/abs/1703.01365
3000
+ class XpsIntegratedGradientsAttribution
3001
+ include Google::Apis::Core::Hashable
3002
+
3003
+ # The number of steps for approximating the path integral. A good value to start
3004
+ # is 50 and gradually increase until the sum to diff property is within the
3005
+ # desired error range. Valid range of its value is [1, 100], inclusively.
3006
+ # Corresponds to the JSON property `stepCount`
3007
+ # @return [Fixnum]
3008
+ attr_accessor :step_count
3009
+
3010
+ def initialize(**args)
3011
+ update!(**args)
3012
+ end
3013
+
3014
+ # Update properties of this object
3015
+ def update!(**args)
3016
+ @step_count = args[:step_count] if args.key?(:step_count)
3017
+ end
3018
+ end
3019
+
3020
+ #
3021
+ class XpsMetricEntry
3022
+ include Google::Apis::Core::Hashable
3023
+
3024
+ # For billing metrics that are using legacy sku's, set the legacy billing metric
3025
+ # id here. This will be sent to Chemist as the "cloudbilling.googleapis.com/
3026
+ # argentum_metric_id" label. Otherwise leave empty.
3027
+ # Corresponds to the JSON property `argentumMetricId`
3028
+ # @return [String]
3029
+ attr_accessor :argentum_metric_id
3030
+
3031
+ # A double value.
3032
+ # Corresponds to the JSON property `doubleValue`
3033
+ # @return [Float]
3034
+ attr_accessor :double_value
3035
+
3036
+ # A signed 64-bit integer value.
3037
+ # Corresponds to the JSON property `int64Value`
3038
+ # @return [Fixnum]
3039
+ attr_accessor :int64_value
3040
+
3041
+ # The metric name defined in the service configuration.
3042
+ # Corresponds to the JSON property `metricName`
3043
+ # @return [String]
3044
+ attr_accessor :metric_name
3045
+
3046
+ # Billing system labels for this (metric, value) pair.
3047
+ # Corresponds to the JSON property `systemLabels`
3048
+ # @return [Array<Google::Apis::LanguageV1::XpsMetricEntryLabel>]
3049
+ attr_accessor :system_labels
3050
+
3051
+ def initialize(**args)
3052
+ update!(**args)
3053
+ end
3054
+
3055
+ # Update properties of this object
3056
+ def update!(**args)
3057
+ @argentum_metric_id = args[:argentum_metric_id] if args.key?(:argentum_metric_id)
3058
+ @double_value = args[:double_value] if args.key?(:double_value)
3059
+ @int64_value = args[:int64_value] if args.key?(:int64_value)
3060
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
3061
+ @system_labels = args[:system_labels] if args.key?(:system_labels)
3062
+ end
3063
+ end
3064
+
3065
+ #
3066
+ class XpsMetricEntryLabel
3067
+ include Google::Apis::Core::Hashable
3068
+
3069
+ # The name of the label.
3070
+ # Corresponds to the JSON property `labelName`
3071
+ # @return [String]
3072
+ attr_accessor :label_name
3073
+
3074
+ # The value of the label.
3075
+ # Corresponds to the JSON property `labelValue`
3076
+ # @return [String]
3077
+ attr_accessor :label_value
3078
+
3079
+ def initialize(**args)
3080
+ update!(**args)
3081
+ end
3082
+
3083
+ # Update properties of this object
3084
+ def update!(**args)
3085
+ @label_name = args[:label_name] if args.key?(:label_name)
3086
+ @label_value = args[:label_value] if args.key?(:label_value)
3087
+ end
3088
+ end
3089
+
3090
+ # A single model artifact item.
3091
+ class XpsModelArtifactItem
3092
+ include Google::Apis::Core::Hashable
3093
+
3094
+ # The model artifact format.
3095
+ # Corresponds to the JSON property `artifactFormat`
3096
+ # @return [String]
3097
+ attr_accessor :artifact_format
3098
+
3099
+ # The Google Cloud Storage (GCS) uri that stores the model binary files.
3100
+ # Corresponds to the JSON property `gcsUri`
3101
+ # @return [String]
3102
+ attr_accessor :gcs_uri
3103
+
3104
+ def initialize(**args)
3105
+ update!(**args)
3106
+ end
3107
+
3108
+ # Update properties of this object
3109
+ def update!(**args)
3110
+ @artifact_format = args[:artifact_format] if args.key?(:artifact_format)
3111
+ @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
3112
+ end
3113
+ end
3114
+
3115
+ # Next ID: 8
3116
+ class XpsPreprocessResponse
3117
+ include Google::Apis::Core::Hashable
3118
+
3119
+ # Set of examples or input sources.
3120
+ # Corresponds to the JSON property `outputExampleSet`
3121
+ # @return [Google::Apis::LanguageV1::XpsExampleSet]
3122
+ attr_accessor :output_example_set
3123
+
3124
+ #
3125
+ # Corresponds to the JSON property `speechPreprocessResp`
3126
+ # @return [Google::Apis::LanguageV1::XpsSpeechPreprocessResponse]
3127
+ attr_accessor :speech_preprocess_resp
3128
+
3129
+ #
3130
+ # Corresponds to the JSON property `tablesPreprocessResponse`
3131
+ # @return [Google::Apis::LanguageV1::XpsTablesPreprocessResponse]
3132
+ attr_accessor :tables_preprocess_response
3133
+
3134
+ # Translation preprocess response.
3135
+ # Corresponds to the JSON property `translationPreprocessResp`
3136
+ # @return [Google::Apis::LanguageV1::XpsTranslationPreprocessResponse]
3137
+ attr_accessor :translation_preprocess_resp
3138
+
3139
+ def initialize(**args)
3140
+ update!(**args)
3141
+ end
3142
+
3143
+ # Update properties of this object
3144
+ def update!(**args)
3145
+ @output_example_set = args[:output_example_set] if args.key?(:output_example_set)
3146
+ @speech_preprocess_resp = args[:speech_preprocess_resp] if args.key?(:speech_preprocess_resp)
3147
+ @tables_preprocess_response = args[:tables_preprocess_response] if args.key?(:tables_preprocess_response)
3148
+ @translation_preprocess_resp = args[:translation_preprocess_resp] if args.key?(:translation_preprocess_resp)
3149
+ end
3150
+ end
3151
+
3152
+ # Model evaluation metrics for regression problems. It can be used for Tables.
3153
+ class XpsRegressionEvaluationMetrics
3154
+ include Google::Apis::Core::Hashable
3155
+
3156
+ # Mean Absolute Error (MAE).
3157
+ # Corresponds to the JSON property `meanAbsoluteError`
3158
+ # @return [Float]
3159
+ attr_accessor :mean_absolute_error
3160
+
3161
+ # Mean absolute percentage error. Only set if all ground truth values are
3162
+ # positive.
3163
+ # Corresponds to the JSON property `meanAbsolutePercentageError`
3164
+ # @return [Float]
3165
+ attr_accessor :mean_absolute_percentage_error
3166
+
3167
+ # R squared.
3168
+ # Corresponds to the JSON property `rSquared`
3169
+ # @return [Float]
3170
+ attr_accessor :r_squared
3171
+
3172
+ # A list of actual versus predicted points for the model being evaluated.
3173
+ # Corresponds to the JSON property `regressionMetricsEntries`
3174
+ # @return [Array<Google::Apis::LanguageV1::XpsRegressionMetricsEntry>]
3175
+ attr_accessor :regression_metrics_entries
3176
+
3177
+ # Root Mean Squared Error (RMSE).
3178
+ # Corresponds to the JSON property `rootMeanSquaredError`
3179
+ # @return [Float]
3180
+ attr_accessor :root_mean_squared_error
3181
+
3182
+ # Root mean squared log error.
3183
+ # Corresponds to the JSON property `rootMeanSquaredLogError`
3184
+ # @return [Float]
3185
+ attr_accessor :root_mean_squared_log_error
3186
+
3187
+ def initialize(**args)
3188
+ update!(**args)
3189
+ end
3190
+
3191
+ # Update properties of this object
3192
+ def update!(**args)
3193
+ @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
3194
+ @mean_absolute_percentage_error = args[:mean_absolute_percentage_error] if args.key?(:mean_absolute_percentage_error)
3195
+ @r_squared = args[:r_squared] if args.key?(:r_squared)
3196
+ @regression_metrics_entries = args[:regression_metrics_entries] if args.key?(:regression_metrics_entries)
3197
+ @root_mean_squared_error = args[:root_mean_squared_error] if args.key?(:root_mean_squared_error)
3198
+ @root_mean_squared_log_error = args[:root_mean_squared_log_error] if args.key?(:root_mean_squared_log_error)
3199
+ end
3200
+ end
3201
+
3202
+ # A pair of actual & observed values for the model being evaluated.
3203
+ class XpsRegressionMetricsEntry
3204
+ include Google::Apis::Core::Hashable
3205
+
3206
+ # The observed value for a row in the dataset.
3207
+ # Corresponds to the JSON property `predictedValue`
3208
+ # @return [Float]
3209
+ attr_accessor :predicted_value
3210
+
3211
+ # The actual target value for a row in the dataset.
3212
+ # Corresponds to the JSON property `trueValue`
3213
+ # @return [Float]
3214
+ attr_accessor :true_value
3215
+
3216
+ def initialize(**args)
3217
+ update!(**args)
3218
+ end
3219
+
3220
+ # Update properties of this object
3221
+ def update!(**args)
3222
+ @predicted_value = args[:predicted_value] if args.key?(:predicted_value)
3223
+ @true_value = args[:true_value] if args.key?(:true_value)
3224
+ end
3225
+ end
3226
+
3227
+ #
3228
+ class XpsReportingMetrics
3229
+ include Google::Apis::Core::Hashable
3230
+
3231
+ # The effective time training used. If set, this is used for quota management
3232
+ # and billing. Deprecated. AutoML BE doesn't use this. Don't set.
3233
+ # Corresponds to the JSON property `effectiveTrainingDuration`
3234
+ # @return [String]
3235
+ attr_accessor :effective_training_duration
3236
+
3237
+ # One entry per metric name. The values must be aggregated per metric name.
3238
+ # Corresponds to the JSON property `metricEntries`
3239
+ # @return [Array<Google::Apis::LanguageV1::XpsMetricEntry>]
3240
+ attr_accessor :metric_entries
3241
+
3242
+ def initialize(**args)
3243
+ update!(**args)
3244
+ end
3245
+
3246
+ # Update properties of this object
3247
+ def update!(**args)
3248
+ @effective_training_duration = args[:effective_training_duration] if args.key?(:effective_training_duration)
3249
+ @metric_entries = args[:metric_entries] if args.key?(:metric_entries)
3250
+ end
3251
+ end
3252
+
3253
+ #
3254
+ class XpsResponseExplanationMetadata
3255
+ include Google::Apis::Core::Hashable
3256
+
3257
+ # Metadata of the input.
3258
+ # Corresponds to the JSON property `inputs`
3259
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsResponseExplanationMetadataInputMetadata>]
3260
+ attr_accessor :inputs
3261
+
3262
+ # Metadata of the output.
3263
+ # Corresponds to the JSON property `outputs`
3264
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsResponseExplanationMetadataOutputMetadata>]
3265
+ attr_accessor :outputs
3266
+
3267
+ def initialize(**args)
3268
+ update!(**args)
3269
+ end
3270
+
3271
+ # Update properties of this object
3272
+ def update!(**args)
3273
+ @inputs = args[:inputs] if args.key?(:inputs)
3274
+ @outputs = args[:outputs] if args.key?(:outputs)
3275
+ end
3276
+ end
3277
+
3278
+ # Metadata of the input of a feature.
3279
+ class XpsResponseExplanationMetadataInputMetadata
3280
+ include Google::Apis::Core::Hashable
3281
+
3282
+ # Name of the input tensor for this model. Only needed in train response.
3283
+ # Corresponds to the JSON property `inputTensorName`
3284
+ # @return [String]
3285
+ attr_accessor :input_tensor_name
3286
+
3287
+ # Modality of the feature. Valid values are: numeric, image. Defaults to numeric.
3288
+ # Corresponds to the JSON property `modality`
3289
+ # @return [String]
3290
+ attr_accessor :modality
3291
+
3292
+ # Visualization configurations for image explanation.
3293
+ # Corresponds to the JSON property `visualizationConfig`
3294
+ # @return [Google::Apis::LanguageV1::XpsVisualization]
3295
+ attr_accessor :visualization_config
3296
+
3297
+ def initialize(**args)
3298
+ update!(**args)
3299
+ end
3300
+
3301
+ # Update properties of this object
3302
+ def update!(**args)
3303
+ @input_tensor_name = args[:input_tensor_name] if args.key?(:input_tensor_name)
3304
+ @modality = args[:modality] if args.key?(:modality)
3305
+ @visualization_config = args[:visualization_config] if args.key?(:visualization_config)
3306
+ end
3307
+ end
3308
+
3309
+ # Metadata of the prediction output to be explained.
3310
+ class XpsResponseExplanationMetadataOutputMetadata
3311
+ include Google::Apis::Core::Hashable
3312
+
3313
+ # Name of the output tensor. Only needed in train response.
3314
+ # Corresponds to the JSON property `outputTensorName`
3315
+ # @return [String]
3316
+ attr_accessor :output_tensor_name
3317
+
3318
+ def initialize(**args)
3319
+ update!(**args)
3320
+ end
3321
+
3322
+ # Update properties of this object
3323
+ def update!(**args)
3324
+ @output_tensor_name = args[:output_tensor_name] if args.key?(:output_tensor_name)
3325
+ end
3326
+ end
3327
+
3328
+ #
3329
+ class XpsResponseExplanationParameters
3330
+ include Google::Apis::Core::Hashable
3331
+
3332
+ # An attribution method that computes the Aumann-Shapley value taking advantage
3333
+ # of the model's fully differentiable structure. Refer to this paper for more
3334
+ # details: https://arxiv.org/abs/1703.01365
3335
+ # Corresponds to the JSON property `integratedGradientsAttribution`
3336
+ # @return [Google::Apis::LanguageV1::XpsIntegratedGradientsAttribution]
3337
+ attr_accessor :integrated_gradients_attribution
3338
+
3339
+ # An explanation method that redistributes Integrated Gradients attributions to
3340
+ # segmented regions, taking advantage of the model's fully differentiable
3341
+ # structure. Refer to this paper for more details: https://arxiv.org/abs/1906.
3342
+ # 02825 Only supports image Models (modality is IMAGE).
3343
+ # Corresponds to the JSON property `xraiAttribution`
3344
+ # @return [Google::Apis::LanguageV1::XpsXraiAttribution]
3345
+ attr_accessor :xrai_attribution
3346
+
3347
+ def initialize(**args)
3348
+ update!(**args)
3349
+ end
3350
+
3351
+ # Update properties of this object
3352
+ def update!(**args)
3353
+ @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution)
3354
+ @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution)
3355
+ end
3356
+ end
3357
+
3358
+ # Specification of Model explanation. Feature-based XAI in AutoML Vision ICN is
3359
+ # deprecated, see b/288407203 for context.
3360
+ class XpsResponseExplanationSpec
3361
+ include Google::Apis::Core::Hashable
3362
+
3363
+ # Explanation type. For AutoML Image Classification models, possible values are:
3364
+ # * `image-integrated-gradients` * `image-xrai`
3365
+ # Corresponds to the JSON property `explanationType`
3366
+ # @return [String]
3367
+ attr_accessor :explanation_type
3368
+
3369
+ # Metadata describing the Model's input and output for explanation.
3370
+ # Corresponds to the JSON property `metadata`
3371
+ # @return [Google::Apis::LanguageV1::XpsResponseExplanationMetadata]
3372
+ attr_accessor :metadata
3373
+
3374
+ # Parameters that configure explaining of the Model's predictions.
3375
+ # Corresponds to the JSON property `parameters`
3376
+ # @return [Google::Apis::LanguageV1::XpsResponseExplanationParameters]
3377
+ attr_accessor :parameters
3378
+
3379
+ def initialize(**args)
3380
+ update!(**args)
3381
+ end
3382
+
3383
+ # Update properties of this object
3384
+ def update!(**args)
3385
+ @explanation_type = args[:explanation_type] if args.key?(:explanation_type)
3386
+ @metadata = args[:metadata] if args.key?(:metadata)
3387
+ @parameters = args[:parameters] if args.key?(:parameters)
3388
+ end
3389
+ end
3390
+
3391
+ #
3392
+ class XpsRow
3393
+ include Google::Apis::Core::Hashable
3394
+
3395
+ # The ids of the columns. Note: The below `values` field must match order of
3396
+ # this field, if this field is set.
3397
+ # Corresponds to the JSON property `columnIds`
3398
+ # @return [Array<Fixnum>]
3399
+ attr_accessor :column_ids
3400
+
3401
+ # The values of the row cells, given in the same order as the column_ids. If
3402
+ # column_ids is not set, then in the same order as the input_feature_column_ids
3403
+ # in TablesModelMetadata.
3404
+ # Corresponds to the JSON property `values`
3405
+ # @return [Array<Object>]
3406
+ attr_accessor :values
3407
+
3408
+ def initialize(**args)
3409
+ update!(**args)
3410
+ end
3411
+
3412
+ # Update properties of this object
3413
+ def update!(**args)
3414
+ @column_ids = args[:column_ids] if args.key?(:column_ids)
3415
+ @values = args[:values] if args.key?(:values)
3416
+ end
3417
+ end
3418
+
3419
+ #
3420
+ class XpsSpeechEvaluationMetrics
3421
+ include Google::Apis::Core::Hashable
3422
+
3423
+ # Evaluation metrics for all submodels contained in this model.
3424
+ # Corresponds to the JSON property `subModelEvaluationMetrics`
3425
+ # @return [Array<Google::Apis::LanguageV1::XpsSpeechEvaluationMetricsSubModelEvaluationMetric>]
3426
+ attr_accessor :sub_model_evaluation_metrics
3427
+
3428
+ def initialize(**args)
3429
+ update!(**args)
3430
+ end
3431
+
3432
+ # Update properties of this object
3433
+ def update!(**args)
3434
+ @sub_model_evaluation_metrics = args[:sub_model_evaluation_metrics] if args.key?(:sub_model_evaluation_metrics)
3435
+ end
3436
+ end
3437
+
3438
+ #
3439
+ class XpsSpeechEvaluationMetricsSubModelEvaluationMetric
3440
+ include Google::Apis::Core::Hashable
3441
+
3442
+ # Type of the biasing model.
3443
+ # Corresponds to the JSON property `biasingModelType`
3444
+ # @return [String]
3445
+ attr_accessor :biasing_model_type
3446
+
3447
+ # If true then it means we have an enhanced version of the biasing models.
3448
+ # Corresponds to the JSON property `isEnhancedModel`
3449
+ # @return [Boolean]
3450
+ attr_accessor :is_enhanced_model
3451
+ alias_method :is_enhanced_model?, :is_enhanced_model
3452
+
3453
+ #
3454
+ # Corresponds to the JSON property `numDeletions`
3455
+ # @return [Fixnum]
3456
+ attr_accessor :num_deletions
3457
+
3458
+ #
3459
+ # Corresponds to the JSON property `numInsertions`
3460
+ # @return [Fixnum]
3461
+ attr_accessor :num_insertions
3462
+
3463
+ #
3464
+ # Corresponds to the JSON property `numSubstitutions`
3465
+ # @return [Fixnum]
3466
+ attr_accessor :num_substitutions
3467
+
3468
+ # Number of utterances used in the wer computation.
3469
+ # Corresponds to the JSON property `numUtterances`
3470
+ # @return [Fixnum]
3471
+ attr_accessor :num_utterances
3472
+
3473
+ # Number of words over which the word error rate was computed.
3474
+ # Corresponds to the JSON property `numWords`
3475
+ # @return [Fixnum]
3476
+ attr_accessor :num_words
3477
+
3478
+ # Below fields are used for debugging purposes
3479
+ # Corresponds to the JSON property `sentenceAccuracy`
3480
+ # @return [Float]
3481
+ attr_accessor :sentence_accuracy
3482
+
3483
+ # Word error rate (standard error metric used for speech recognition).
3484
+ # Corresponds to the JSON property `wer`
3485
+ # @return [Float]
3486
+ attr_accessor :wer
3487
+
3488
+ def initialize(**args)
3489
+ update!(**args)
3490
+ end
3491
+
3492
+ # Update properties of this object
3493
+ def update!(**args)
3494
+ @biasing_model_type = args[:biasing_model_type] if args.key?(:biasing_model_type)
3495
+ @is_enhanced_model = args[:is_enhanced_model] if args.key?(:is_enhanced_model)
3496
+ @num_deletions = args[:num_deletions] if args.key?(:num_deletions)
3497
+ @num_insertions = args[:num_insertions] if args.key?(:num_insertions)
3498
+ @num_substitutions = args[:num_substitutions] if args.key?(:num_substitutions)
3499
+ @num_utterances = args[:num_utterances] if args.key?(:num_utterances)
3500
+ @num_words = args[:num_words] if args.key?(:num_words)
3501
+ @sentence_accuracy = args[:sentence_accuracy] if args.key?(:sentence_accuracy)
3502
+ @wer = args[:wer] if args.key?(:wer)
3503
+ end
3504
+ end
3505
+
3506
+ #
3507
+ class XpsSpeechModelSpec
3508
+ include Google::Apis::Core::Hashable
3509
+
3510
+ # Required for speech xps backend. Speech xps has to use dataset_id and model_id
3511
+ # as the primary key in db so that speech API can query the db directly.
3512
+ # Corresponds to the JSON property `datasetId`
3513
+ # @return [Fixnum]
3514
+ attr_accessor :dataset_id
3515
+
3516
+ #
3517
+ # Corresponds to the JSON property `language`
3518
+ # @return [String]
3519
+ attr_accessor :language
3520
+
3521
+ # Model specs for all submodels contained in this model.
3522
+ # Corresponds to the JSON property `subModelSpecs`
3523
+ # @return [Array<Google::Apis::LanguageV1::XpsSpeechModelSpecSubModelSpec>]
3524
+ attr_accessor :sub_model_specs
3525
+
3526
+ def initialize(**args)
3527
+ update!(**args)
3528
+ end
3529
+
3530
+ # Update properties of this object
3531
+ def update!(**args)
3532
+ @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
3533
+ @language = args[:language] if args.key?(:language)
3534
+ @sub_model_specs = args[:sub_model_specs] if args.key?(:sub_model_specs)
3535
+ end
3536
+ end
3537
+
3538
+ #
3539
+ class XpsSpeechModelSpecSubModelSpec
3540
+ include Google::Apis::Core::Hashable
3541
+
3542
+ # Type of the biasing model.
3543
+ # Corresponds to the JSON property `biasingModelType`
3544
+ # @return [String]
3545
+ attr_accessor :biasing_model_type
3546
+
3547
+ # In S3, Recognition ClientContextId.client_id
3548
+ # Corresponds to the JSON property `clientId`
3549
+ # @return [String]
3550
+ attr_accessor :client_id
3551
+
3552
+ # In S3, Recognition ClientContextId.context_id
3553
+ # Corresponds to the JSON property `contextId`
3554
+ # @return [String]
3555
+ attr_accessor :context_id
3556
+
3557
+ # If true then it means we have an enhanced version of the biasing models.
3558
+ # Corresponds to the JSON property `isEnhancedModel`
3559
+ # @return [Boolean]
3560
+ attr_accessor :is_enhanced_model
3561
+ alias_method :is_enhanced_model?, :is_enhanced_model
3562
+
3563
+ def initialize(**args)
3564
+ update!(**args)
3565
+ end
3566
+
3567
+ # Update properties of this object
3568
+ def update!(**args)
3569
+ @biasing_model_type = args[:biasing_model_type] if args.key?(:biasing_model_type)
3570
+ @client_id = args[:client_id] if args.key?(:client_id)
3571
+ @context_id = args[:context_id] if args.key?(:context_id)
3572
+ @is_enhanced_model = args[:is_enhanced_model] if args.key?(:is_enhanced_model)
3573
+ end
3574
+ end
3575
+
3576
+ #
3577
+ class XpsSpeechPreprocessResponse
3578
+ include Google::Apis::Core::Hashable
3579
+
3580
+ # Location od shards of sstables (test data) of DataUtterance protos.
3581
+ # Corresponds to the JSON property `cnsTestDataPath`
3582
+ # @return [String]
3583
+ attr_accessor :cns_test_data_path
3584
+
3585
+ # Location of shards of sstables (training data) of DataUtterance protos.
3586
+ # Corresponds to the JSON property `cnsTrainDataPath`
3587
+ # @return [String]
3588
+ attr_accessor :cns_train_data_path
3589
+
3590
+ # The metrics for prebuilt speech models. They are included here because there
3591
+ # is no prebuilt speech models stored in the AutoML.
3592
+ # Corresponds to the JSON property `prebuiltModelEvaluationMetrics`
3593
+ # @return [Google::Apis::LanguageV1::XpsSpeechEvaluationMetrics]
3594
+ attr_accessor :prebuilt_model_evaluation_metrics
3595
+
3596
+ # Stats associated with the data.
3597
+ # Corresponds to the JSON property `speechPreprocessStats`
3598
+ # @return [Google::Apis::LanguageV1::XpsSpeechPreprocessStats]
3599
+ attr_accessor :speech_preprocess_stats
3600
+
3601
+ def initialize(**args)
3602
+ update!(**args)
3603
+ end
3604
+
3605
+ # Update properties of this object
3606
+ def update!(**args)
3607
+ @cns_test_data_path = args[:cns_test_data_path] if args.key?(:cns_test_data_path)
3608
+ @cns_train_data_path = args[:cns_train_data_path] if args.key?(:cns_train_data_path)
3609
+ @prebuilt_model_evaluation_metrics = args[:prebuilt_model_evaluation_metrics] if args.key?(:prebuilt_model_evaluation_metrics)
3610
+ @speech_preprocess_stats = args[:speech_preprocess_stats] if args.key?(:speech_preprocess_stats)
3611
+ end
3612
+ end
3613
+
3614
+ #
3615
+ class XpsSpeechPreprocessStats
3616
+ include Google::Apis::Core::Hashable
3617
+
3618
+ # Different types of data errors and the counts associated with them.
3619
+ # Corresponds to the JSON property `dataErrors`
3620
+ # @return [Array<Google::Apis::LanguageV1::XpsDataErrors>]
3621
+ attr_accessor :data_errors
3622
+
3623
+ # The number of rows marked HUMAN_LABELLED
3624
+ # Corresponds to the JSON property `numHumanLabeledExamples`
3625
+ # @return [Fixnum]
3626
+ attr_accessor :num_human_labeled_examples
3627
+
3628
+ # The number of samples found in the previously recorded logs data.
3629
+ # Corresponds to the JSON property `numLogsExamples`
3630
+ # @return [Fixnum]
3631
+ attr_accessor :num_logs_examples
3632
+
3633
+ # The number of rows marked as MACHINE_TRANSCRIBED
3634
+ # Corresponds to the JSON property `numMachineTranscribedExamples`
3635
+ # @return [Fixnum]
3636
+ attr_accessor :num_machine_transcribed_examples
3637
+
3638
+ # The number of examples labelled as TEST by Speech xps server.
3639
+ # Corresponds to the JSON property `testExamplesCount`
3640
+ # @return [Fixnum]
3641
+ attr_accessor :test_examples_count
3642
+
3643
+ # The number of sentences in the test data set.
3644
+ # Corresponds to the JSON property `testSentencesCount`
3645
+ # @return [Fixnum]
3646
+ attr_accessor :test_sentences_count
3647
+
3648
+ # The number of words in the test data set.
3649
+ # Corresponds to the JSON property `testWordsCount`
3650
+ # @return [Fixnum]
3651
+ attr_accessor :test_words_count
3652
+
3653
+ # The number of examples labeled as TRAIN by Speech xps server.
3654
+ # Corresponds to the JSON property `trainExamplesCount`
3655
+ # @return [Fixnum]
3656
+ attr_accessor :train_examples_count
3657
+
3658
+ # The number of sentences in the training data set.
3659
+ # Corresponds to the JSON property `trainSentencesCount`
3660
+ # @return [Fixnum]
3661
+ attr_accessor :train_sentences_count
3662
+
3663
+ # The number of words in the training data set.
3664
+ # Corresponds to the JSON property `trainWordsCount`
3665
+ # @return [Fixnum]
3666
+ attr_accessor :train_words_count
3667
+
3668
+ def initialize(**args)
3669
+ update!(**args)
3670
+ end
3671
+
3672
+ # Update properties of this object
3673
+ def update!(**args)
3674
+ @data_errors = args[:data_errors] if args.key?(:data_errors)
3675
+ @num_human_labeled_examples = args[:num_human_labeled_examples] if args.key?(:num_human_labeled_examples)
3676
+ @num_logs_examples = args[:num_logs_examples] if args.key?(:num_logs_examples)
3677
+ @num_machine_transcribed_examples = args[:num_machine_transcribed_examples] if args.key?(:num_machine_transcribed_examples)
3678
+ @test_examples_count = args[:test_examples_count] if args.key?(:test_examples_count)
3679
+ @test_sentences_count = args[:test_sentences_count] if args.key?(:test_sentences_count)
3680
+ @test_words_count = args[:test_words_count] if args.key?(:test_words_count)
3681
+ @train_examples_count = args[:train_examples_count] if args.key?(:train_examples_count)
3682
+ @train_sentences_count = args[:train_sentences_count] if args.key?(:train_sentences_count)
3683
+ @train_words_count = args[:train_words_count] if args.key?(:train_words_count)
3684
+ end
3685
+ end
3686
+
3687
+ # The data statistics of a series of STRING values.
3688
+ class XpsStringStats
3689
+ include Google::Apis::Core::Hashable
3690
+
3691
+ # Common statistics for a column with a specified data type.
3692
+ # Corresponds to the JSON property `commonStats`
3693
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
3694
+ attr_accessor :common_stats
3695
+
3696
+ # The statistics of the top 20 unigrams, ordered by StringStats.UnigramStats.
3697
+ # count.
3698
+ # Corresponds to the JSON property `topUnigramStats`
3699
+ # @return [Array<Google::Apis::LanguageV1::XpsStringStatsUnigramStats>]
3700
+ attr_accessor :top_unigram_stats
3701
+
3702
+ def initialize(**args)
3703
+ update!(**args)
3704
+ end
3705
+
3706
+ # Update properties of this object
3707
+ def update!(**args)
3708
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
3709
+ @top_unigram_stats = args[:top_unigram_stats] if args.key?(:top_unigram_stats)
3710
+ end
3711
+ end
3712
+
3713
+ # The statistics of a unigram.
3714
+ class XpsStringStatsUnigramStats
3715
+ include Google::Apis::Core::Hashable
3716
+
3717
+ # The number of occurrences of this unigram in the series.
3718
+ # Corresponds to the JSON property `count`
3719
+ # @return [Fixnum]
3720
+ attr_accessor :count
3721
+
3722
+ # The unigram.
3723
+ # Corresponds to the JSON property `value`
3724
+ # @return [String]
3725
+ attr_accessor :value
3726
+
3727
+ def initialize(**args)
3728
+ update!(**args)
3729
+ end
3730
+
3731
+ # Update properties of this object
3732
+ def update!(**args)
3733
+ @count = args[:count] if args.key?(:count)
3734
+ @value = args[:value] if args.key?(:value)
3735
+ end
3736
+ end
3737
+
3738
+ # The data statistics of a series of STRUCT values.
3739
+ class XpsStructStats
3740
+ include Google::Apis::Core::Hashable
3741
+
3742
+ # Common statistics for a column with a specified data type.
3743
+ # Corresponds to the JSON property `commonStats`
3744
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
3745
+ attr_accessor :common_stats
3746
+
3747
+ # Map from a field name of the struct to data stats aggregated over series of
3748
+ # all data in that field across all the structs.
3749
+ # Corresponds to the JSON property `fieldStats`
3750
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsDataStats>]
3751
+ attr_accessor :field_stats
3752
+
3753
+ def initialize(**args)
3754
+ update!(**args)
3755
+ end
3756
+
3757
+ # Update properties of this object
3758
+ def update!(**args)
3759
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
3760
+ @field_stats = args[:field_stats] if args.key?(:field_stats)
3761
+ end
3762
+ end
3763
+
3764
+ # `StructType` defines the DataType-s of a STRUCT type.
3765
+ class XpsStructType
3766
+ include Google::Apis::Core::Hashable
3767
+
3768
+ # Unordered map of struct field names to their data types.
3769
+ # Corresponds to the JSON property `fields`
3770
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsDataType>]
3771
+ attr_accessor :fields
3772
+
3773
+ def initialize(**args)
3774
+ update!(**args)
3775
+ end
3776
+
3777
+ # Update properties of this object
3778
+ def update!(**args)
3779
+ @fields = args[:fields] if args.key?(:fields)
3780
+ end
3781
+ end
3782
+
3783
+ #
3784
+ class XpsTableSpec
3785
+ include Google::Apis::Core::Hashable
3786
+
3787
+ # Mapping from column id to column spec.
3788
+ # Corresponds to the JSON property `columnSpecs`
3789
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsColumnSpec>]
3790
+ attr_accessor :column_specs
3791
+
3792
+ # The total size of imported data of the table.
3793
+ # Corresponds to the JSON property `importedDataSizeInBytes`
3794
+ # @return [Fixnum]
3795
+ attr_accessor :imported_data_size_in_bytes
3796
+
3797
+ # The number of rows in the table.
3798
+ # Corresponds to the JSON property `rowCount`
3799
+ # @return [Fixnum]
3800
+ attr_accessor :row_count
3801
+
3802
+ # The id of the time column.
3803
+ # Corresponds to the JSON property `timeColumnId`
3804
+ # @return [Fixnum]
3805
+ attr_accessor :time_column_id
3806
+
3807
+ # The number of valid rows.
3808
+ # Corresponds to the JSON property `validRowCount`
3809
+ # @return [Fixnum]
3810
+ attr_accessor :valid_row_count
3811
+
3812
+ def initialize(**args)
3813
+ update!(**args)
3814
+ end
3815
+
3816
+ # Update properties of this object
3817
+ def update!(**args)
3818
+ @column_specs = args[:column_specs] if args.key?(:column_specs)
3819
+ @imported_data_size_in_bytes = args[:imported_data_size_in_bytes] if args.key?(:imported_data_size_in_bytes)
3820
+ @row_count = args[:row_count] if args.key?(:row_count)
3821
+ @time_column_id = args[:time_column_id] if args.key?(:time_column_id)
3822
+ @valid_row_count = args[:valid_row_count] if args.key?(:valid_row_count)
3823
+ end
3824
+ end
3825
+
3826
+ # Metrics for Tables classification problems.
3827
+ class XpsTablesClassificationMetrics
3828
+ include Google::Apis::Core::Hashable
3829
+
3830
+ # Metrics building a curve.
3831
+ # Corresponds to the JSON property `curveMetrics`
3832
+ # @return [Array<Google::Apis::LanguageV1::XpsTablesClassificationMetricsCurveMetrics>]
3833
+ attr_accessor :curve_metrics
3834
+
3835
+ def initialize(**args)
3836
+ update!(**args)
3837
+ end
3838
+
3839
+ # Update properties of this object
3840
+ def update!(**args)
3841
+ @curve_metrics = args[:curve_metrics] if args.key?(:curve_metrics)
3842
+ end
3843
+ end
3844
+
3845
+ # Metrics curve data point for a single value.
3846
+ class XpsTablesClassificationMetricsCurveMetrics
3847
+ include Google::Apis::Core::Hashable
3848
+
3849
+ # The area under the precision-recall curve.
3850
+ # Corresponds to the JSON property `aucPr`
3851
+ # @return [Float]
3852
+ attr_accessor :auc_pr
3853
+
3854
+ # The area under receiver operating characteristic curve.
3855
+ # Corresponds to the JSON property `aucRoc`
3856
+ # @return [Float]
3857
+ attr_accessor :auc_roc
3858
+
3859
+ # Metrics that have confidence thresholds. Precision-recall curve and ROC curve
3860
+ # can be derived from them.
3861
+ # Corresponds to the JSON property `confidenceMetricsEntries`
3862
+ # @return [Array<Google::Apis::LanguageV1::XpsTablesConfidenceMetricsEntry>]
3863
+ attr_accessor :confidence_metrics_entries
3864
+
3865
+ # The Log loss metric.
3866
+ # Corresponds to the JSON property `logLoss`
3867
+ # @return [Float]
3868
+ attr_accessor :log_loss
3869
+
3870
+ # The position threshold value used to compute the metrics.
3871
+ # Corresponds to the JSON property `positionThreshold`
3872
+ # @return [Fixnum]
3873
+ attr_accessor :position_threshold
3874
+
3875
+ # The CATEGORY row value (for ARRAY unnested) the curve metrics are for.
3876
+ # Corresponds to the JSON property `value`
3877
+ # @return [String]
3878
+ attr_accessor :value
3879
+
3880
+ def initialize(**args)
3881
+ update!(**args)
3882
+ end
3883
+
3884
+ # Update properties of this object
3885
+ def update!(**args)
3886
+ @auc_pr = args[:auc_pr] if args.key?(:auc_pr)
3887
+ @auc_roc = args[:auc_roc] if args.key?(:auc_roc)
3888
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
3889
+ @log_loss = args[:log_loss] if args.key?(:log_loss)
3890
+ @position_threshold = args[:position_threshold] if args.key?(:position_threshold)
3891
+ @value = args[:value] if args.key?(:value)
3892
+ end
3893
+ end
3894
+
3895
+ # Metrics for a single confidence threshold.
3896
+ class XpsTablesConfidenceMetricsEntry
3897
+ include Google::Apis::Core::Hashable
3898
+
3899
+ # The confidence threshold value used to compute the metrics.
3900
+ # Corresponds to the JSON property `confidenceThreshold`
3901
+ # @return [Float]
3902
+ attr_accessor :confidence_threshold
3903
+
3904
+ # The harmonic mean of recall and precision. (2 * precision * recall) / (
3905
+ # precision + recall)
3906
+ # Corresponds to the JSON property `f1Score`
3907
+ # @return [Float]
3908
+ attr_accessor :f1_score
3909
+
3910
+ # False negative count.
3911
+ # Corresponds to the JSON property `falseNegativeCount`
3912
+ # @return [Fixnum]
3913
+ attr_accessor :false_negative_count
3914
+
3915
+ # False positive count.
3916
+ # Corresponds to the JSON property `falsePositiveCount`
3917
+ # @return [Fixnum]
3918
+ attr_accessor :false_positive_count
3919
+
3920
+ # FPR = #false positives / (#false positives + #true negatives)
3921
+ # Corresponds to the JSON property `falsePositiveRate`
3922
+ # @return [Float]
3923
+ attr_accessor :false_positive_rate
3924
+
3925
+ # Precision = #true positives / (#true positives + #false positives).
3926
+ # Corresponds to the JSON property `precision`
3927
+ # @return [Float]
3928
+ attr_accessor :precision
3929
+
3930
+ # Recall = #true positives / (#true positives + #false negatives).
3931
+ # Corresponds to the JSON property `recall`
3932
+ # @return [Float]
3933
+ attr_accessor :recall
3934
+
3935
+ # True negative count.
3936
+ # Corresponds to the JSON property `trueNegativeCount`
3937
+ # @return [Fixnum]
3938
+ attr_accessor :true_negative_count
3939
+
3940
+ # True positive count.
3941
+ # Corresponds to the JSON property `truePositiveCount`
3942
+ # @return [Fixnum]
3943
+ attr_accessor :true_positive_count
3944
+
3945
+ # TPR = #true positives / (#true positives + #false negatvies)
3946
+ # Corresponds to the JSON property `truePositiveRate`
3947
+ # @return [Float]
3948
+ attr_accessor :true_positive_rate
3949
+
3950
+ def initialize(**args)
3951
+ update!(**args)
3952
+ end
3953
+
3954
+ # Update properties of this object
3955
+ def update!(**args)
3956
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
3957
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
3958
+ @false_negative_count = args[:false_negative_count] if args.key?(:false_negative_count)
3959
+ @false_positive_count = args[:false_positive_count] if args.key?(:false_positive_count)
3960
+ @false_positive_rate = args[:false_positive_rate] if args.key?(:false_positive_rate)
3961
+ @precision = args[:precision] if args.key?(:precision)
3962
+ @recall = args[:recall] if args.key?(:recall)
3963
+ @true_negative_count = args[:true_negative_count] if args.key?(:true_negative_count)
3964
+ @true_positive_count = args[:true_positive_count] if args.key?(:true_positive_count)
3965
+ @true_positive_rate = args[:true_positive_rate] if args.key?(:true_positive_rate)
3966
+ end
3967
+ end
3968
+
3969
+ # Metadata for a dataset used for AutoML Tables. Next ID: 6
3970
+ class XpsTablesDatasetMetadata
3971
+ include Google::Apis::Core::Hashable
3972
+
3973
+ # Id the column to split the table.
3974
+ # Corresponds to the JSON property `mlUseColumnId`
3975
+ # @return [Fixnum]
3976
+ attr_accessor :ml_use_column_id
3977
+
3978
+ # Primary table.
3979
+ # Corresponds to the JSON property `primaryTableSpec`
3980
+ # @return [Google::Apis::LanguageV1::XpsTableSpec]
3981
+ attr_accessor :primary_table_spec
3982
+
3983
+ # (the column id : its CorrelationStats with target column).
3984
+ # Corresponds to the JSON property `targetColumnCorrelations`
3985
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsCorrelationStats>]
3986
+ attr_accessor :target_column_correlations
3987
+
3988
+ # Id of the primary table column that should be used as the training label.
3989
+ # Corresponds to the JSON property `targetColumnId`
3990
+ # @return [Fixnum]
3991
+ attr_accessor :target_column_id
3992
+
3993
+ # Id of the primary table column that should be used as the weight column.
3994
+ # Corresponds to the JSON property `weightColumnId`
3995
+ # @return [Fixnum]
3996
+ attr_accessor :weight_column_id
3997
+
3998
+ def initialize(**args)
3999
+ update!(**args)
4000
+ end
4001
+
4002
+ # Update properties of this object
4003
+ def update!(**args)
4004
+ @ml_use_column_id = args[:ml_use_column_id] if args.key?(:ml_use_column_id)
4005
+ @primary_table_spec = args[:primary_table_spec] if args.key?(:primary_table_spec)
4006
+ @target_column_correlations = args[:target_column_correlations] if args.key?(:target_column_correlations)
4007
+ @target_column_id = args[:target_column_id] if args.key?(:target_column_id)
4008
+ @weight_column_id = args[:weight_column_id] if args.key?(:weight_column_id)
4009
+ end
4010
+ end
4011
+
4012
+ #
4013
+ class XpsTablesEvaluationMetrics
4014
+ include Google::Apis::Core::Hashable
4015
+
4016
+ # Metrics for Tables classification problems.
4017
+ # Corresponds to the JSON property `classificationMetrics`
4018
+ # @return [Google::Apis::LanguageV1::XpsTablesClassificationMetrics]
4019
+ attr_accessor :classification_metrics
4020
+
4021
+ # Metrics for Tables regression problems.
4022
+ # Corresponds to the JSON property `regressionMetrics`
4023
+ # @return [Google::Apis::LanguageV1::XpsTablesRegressionMetrics]
4024
+ attr_accessor :regression_metrics
4025
+
4026
+ def initialize(**args)
4027
+ update!(**args)
4028
+ end
4029
+
4030
+ # Update properties of this object
4031
+ def update!(**args)
4032
+ @classification_metrics = args[:classification_metrics] if args.key?(:classification_metrics)
4033
+ @regression_metrics = args[:regression_metrics] if args.key?(:regression_metrics)
4034
+ end
4035
+ end
4036
+
4037
+ # An information specific to given column and Tables Model, in context of the
4038
+ # Model and the predictions created by it.
4039
+ class XpsTablesModelColumnInfo
4040
+ include Google::Apis::Core::Hashable
4041
+
4042
+ # The ID of the column.
4043
+ # Corresponds to the JSON property `columnId`
4044
+ # @return [Fixnum]
4045
+ attr_accessor :column_id
4046
+
4047
+ # When given as part of a Model: Measurement of how much model predictions
4048
+ # correctness on the TEST data depend on values in this column. A value between
4049
+ # 0 and 1, higher means higher influence. These values are normalized - for all
4050
+ # input feature columns of a given model they add to 1. When given back by
4051
+ # Predict or Batch Predict: Measurement of how impactful for the prediction
4052
+ # returned for the given row the value in this column was. Specifically, the
4053
+ # feature importance specifies the marginal contribution that the feature made
4054
+ # to the prediction score compared to the baseline score. These values are
4055
+ # computed using the Sampled Shapley method.
4056
+ # Corresponds to the JSON property `featureImportance`
4057
+ # @return [Float]
4058
+ attr_accessor :feature_importance
4059
+
4060
+ def initialize(**args)
4061
+ update!(**args)
4062
+ end
4063
+
4064
+ # Update properties of this object
4065
+ def update!(**args)
4066
+ @column_id = args[:column_id] if args.key?(:column_id)
4067
+ @feature_importance = args[:feature_importance] if args.key?(:feature_importance)
4068
+ end
4069
+ end
4070
+
4071
+ # A description of Tables model structure.
4072
+ class XpsTablesModelStructure
4073
+ include Google::Apis::Core::Hashable
4074
+
4075
+ # A list of models.
4076
+ # Corresponds to the JSON property `modelParameters`
4077
+ # @return [Array<Google::Apis::LanguageV1::XpsTablesModelStructureModelParameters>]
4078
+ attr_accessor :model_parameters
4079
+
4080
+ def initialize(**args)
4081
+ update!(**args)
4082
+ end
4083
+
4084
+ # Update properties of this object
4085
+ def update!(**args)
4086
+ @model_parameters = args[:model_parameters] if args.key?(:model_parameters)
4087
+ end
4088
+ end
4089
+
4090
+ # Model hyper-parameters for a model.
4091
+ class XpsTablesModelStructureModelParameters
4092
+ include Google::Apis::Core::Hashable
4093
+
4094
+ #
4095
+ # Corresponds to the JSON property `hyperparameters`
4096
+ # @return [Array<Google::Apis::LanguageV1::XpsTablesModelStructureModelParametersParameter>]
4097
+ attr_accessor :hyperparameters
4098
+
4099
+ def initialize(**args)
4100
+ update!(**args)
4101
+ end
4102
+
4103
+ # Update properties of this object
4104
+ def update!(**args)
4105
+ @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
4106
+ end
4107
+ end
4108
+
4109
+ #
4110
+ class XpsTablesModelStructureModelParametersParameter
4111
+ include Google::Apis::Core::Hashable
4112
+
4113
+ # Float type parameter value.
4114
+ # Corresponds to the JSON property `floatValue`
4115
+ # @return [Float]
4116
+ attr_accessor :float_value
4117
+
4118
+ # Integer type parameter value.
4119
+ # Corresponds to the JSON property `intValue`
4120
+ # @return [Fixnum]
4121
+ attr_accessor :int_value
4122
+
4123
+ # Parameter name.
4124
+ # Corresponds to the JSON property `name`
4125
+ # @return [String]
4126
+ attr_accessor :name
4127
+
4128
+ # String type parameter value.
4129
+ # Corresponds to the JSON property `stringValue`
4130
+ # @return [String]
4131
+ attr_accessor :string_value
4132
+
4133
+ def initialize(**args)
4134
+ update!(**args)
4135
+ end
4136
+
4137
+ # Update properties of this object
4138
+ def update!(**args)
4139
+ @float_value = args[:float_value] if args.key?(:float_value)
4140
+ @int_value = args[:int_value] if args.key?(:int_value)
4141
+ @name = args[:name] if args.key?(:name)
4142
+ @string_value = args[:string_value] if args.key?(:string_value)
4143
+ end
4144
+ end
4145
+
4146
+ #
4147
+ class XpsTablesPreprocessResponse
4148
+ include Google::Apis::Core::Hashable
4149
+
4150
+ # Metadata for a dataset used for AutoML Tables. Next ID: 6
4151
+ # Corresponds to the JSON property `tablesDatasetMetadata`
4152
+ # @return [Google::Apis::LanguageV1::XpsTablesDatasetMetadata]
4153
+ attr_accessor :tables_dataset_metadata
4154
+
4155
+ def initialize(**args)
4156
+ update!(**args)
4157
+ end
4158
+
4159
+ # Update properties of this object
4160
+ def update!(**args)
4161
+ @tables_dataset_metadata = args[:tables_dataset_metadata] if args.key?(:tables_dataset_metadata)
4162
+ end
4163
+ end
4164
+
4165
+ # Metrics for Tables regression problems.
4166
+ class XpsTablesRegressionMetrics
4167
+ include Google::Apis::Core::Hashable
4168
+
4169
+ # Mean absolute error.
4170
+ # Corresponds to the JSON property `meanAbsoluteError`
4171
+ # @return [Float]
4172
+ attr_accessor :mean_absolute_error
4173
+
4174
+ # Mean absolute percentage error, only set if all of the target column's values
4175
+ # are positive.
4176
+ # Corresponds to the JSON property `meanAbsolutePercentageError`
4177
+ # @return [Float]
4178
+ attr_accessor :mean_absolute_percentage_error
4179
+
4180
+ # R squared.
4181
+ # Corresponds to the JSON property `rSquared`
4182
+ # @return [Float]
4183
+ attr_accessor :r_squared
4184
+
4185
+ # A list of actual versus predicted points for the model being evaluated.
4186
+ # Corresponds to the JSON property `regressionMetricsEntries`
4187
+ # @return [Array<Google::Apis::LanguageV1::XpsRegressionMetricsEntry>]
4188
+ attr_accessor :regression_metrics_entries
4189
+
4190
+ # Root mean squared error.
4191
+ # Corresponds to the JSON property `rootMeanSquaredError`
4192
+ # @return [Float]
4193
+ attr_accessor :root_mean_squared_error
4194
+
4195
+ # Root mean squared log error.
4196
+ # Corresponds to the JSON property `rootMeanSquaredLogError`
4197
+ # @return [Float]
4198
+ attr_accessor :root_mean_squared_log_error
4199
+
4200
+ def initialize(**args)
4201
+ update!(**args)
4202
+ end
4203
+
4204
+ # Update properties of this object
4205
+ def update!(**args)
4206
+ @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
4207
+ @mean_absolute_percentage_error = args[:mean_absolute_percentage_error] if args.key?(:mean_absolute_percentage_error)
4208
+ @r_squared = args[:r_squared] if args.key?(:r_squared)
4209
+ @regression_metrics_entries = args[:regression_metrics_entries] if args.key?(:regression_metrics_entries)
4210
+ @root_mean_squared_error = args[:root_mean_squared_error] if args.key?(:root_mean_squared_error)
4211
+ @root_mean_squared_log_error = args[:root_mean_squared_log_error] if args.key?(:root_mean_squared_log_error)
4212
+ end
4213
+ end
4214
+
4215
+ #
4216
+ class XpsTablesTrainResponse
4217
+ include Google::Apis::Core::Hashable
4218
+
4219
+ # A description of Tables model structure.
4220
+ # Corresponds to the JSON property `modelStructure`
4221
+ # @return [Google::Apis::LanguageV1::XpsTablesModelStructure]
4222
+ attr_accessor :model_structure
4223
+
4224
+ # Sample rows from the dataset this model was trained.
4225
+ # Corresponds to the JSON property `predictionSampleRows`
4226
+ # @return [Array<Google::Apis::LanguageV1::XpsRow>]
4227
+ attr_accessor :prediction_sample_rows
4228
+
4229
+ # Output only. Auxiliary information for each of the input_feature_column_specs,
4230
+ # with respect to this particular model.
4231
+ # Corresponds to the JSON property `tablesModelColumnInfo`
4232
+ # @return [Array<Google::Apis::LanguageV1::XpsTablesModelColumnInfo>]
4233
+ attr_accessor :tables_model_column_info
4234
+
4235
+ # The actual training cost of the model, expressed in milli node hours, i.e. 1,
4236
+ # 000 value in this field means 1 node hour. Guaranteed to not exceed the train
4237
+ # budget.
4238
+ # Corresponds to the JSON property `trainCostMilliNodeHours`
4239
+ # @return [Fixnum]
4240
+ attr_accessor :train_cost_milli_node_hours
4241
+
4242
+ def initialize(**args)
4243
+ update!(**args)
4244
+ end
4245
+
4246
+ # Update properties of this object
4247
+ def update!(**args)
4248
+ @model_structure = args[:model_structure] if args.key?(:model_structure)
4249
+ @prediction_sample_rows = args[:prediction_sample_rows] if args.key?(:prediction_sample_rows)
4250
+ @tables_model_column_info = args[:tables_model_column_info] if args.key?(:tables_model_column_info)
4251
+ @train_cost_milli_node_hours = args[:train_cost_milli_node_hours] if args.key?(:train_cost_milli_node_hours)
4252
+ end
4253
+ end
4254
+
4255
+ #
4256
+ class XpsTablesTrainingOperationMetadata
4257
+ include Google::Apis::Core::Hashable
4258
+
4259
+ # Current stage of creating model.
4260
+ # Corresponds to the JSON property `createModelStage`
4261
+ # @return [String]
4262
+ attr_accessor :create_model_stage
4263
+
4264
+ # The optimization objective for model.
4265
+ # Corresponds to the JSON property `optimizationObjective`
4266
+ # @return [String]
4267
+ attr_accessor :optimization_objective
4268
+
4269
+ # This field is for training. When the operation is terminated successfully,
4270
+ # AutoML Backend post this field to operation metadata in spanner. If the
4271
+ # metadata has no trials returned, the training operation is supposed to be a
4272
+ # failure.
4273
+ # Corresponds to the JSON property `topTrials`
4274
+ # @return [Array<Google::Apis::LanguageV1::XpsTuningTrial>]
4275
+ attr_accessor :top_trials
4276
+
4277
+ # Creating model budget.
4278
+ # Corresponds to the JSON property `trainBudgetMilliNodeHours`
4279
+ # @return [Fixnum]
4280
+ attr_accessor :train_budget_milli_node_hours
4281
+
4282
+ # This field records the training objective value with respect to time, giving
4283
+ # insight into how the model architecture search is performing as training time
4284
+ # elapses.
4285
+ # Corresponds to the JSON property `trainingObjectivePoints`
4286
+ # @return [Array<Google::Apis::LanguageV1::XpsTrainingObjectivePoint>]
4287
+ attr_accessor :training_objective_points
4288
+
4289
+ # Timestamp when training process starts.
4290
+ # Corresponds to the JSON property `trainingStartTime`
4291
+ # @return [String]
4292
+ attr_accessor :training_start_time
4293
+
4294
+ def initialize(**args)
4295
+ update!(**args)
4296
+ end
4297
+
4298
+ # Update properties of this object
4299
+ def update!(**args)
4300
+ @create_model_stage = args[:create_model_stage] if args.key?(:create_model_stage)
4301
+ @optimization_objective = args[:optimization_objective] if args.key?(:optimization_objective)
4302
+ @top_trials = args[:top_trials] if args.key?(:top_trials)
4303
+ @train_budget_milli_node_hours = args[:train_budget_milli_node_hours] if args.key?(:train_budget_milli_node_hours)
4304
+ @training_objective_points = args[:training_objective_points] if args.key?(:training_objective_points)
4305
+ @training_start_time = args[:training_start_time] if args.key?(:training_start_time)
4306
+ end
4307
+ end
4308
+
4309
+ # Component model. Next ID: 10
4310
+ class XpsTextComponentModel
4311
+ include Google::Apis::Core::Hashable
4312
+
4313
+ # The Cloud Storage resource path to hold batch prediction model.
4314
+ # Corresponds to the JSON property `batchPredictionModelGcsUri`
4315
+ # @return [String]
4316
+ attr_accessor :batch_prediction_model_gcs_uri
4317
+
4318
+ # The Cloud Storage resource path to hold online prediction model.
4319
+ # Corresponds to the JSON property `onlinePredictionModelGcsUri`
4320
+ # @return [String]
4321
+ attr_accessor :online_prediction_model_gcs_uri
4322
+
4323
+ # The partition where the model is deployed. Populated by uCAIP BE as part of
4324
+ # online PredictRequest.
4325
+ # Corresponds to the JSON property `partition`
4326
+ # @return [String]
4327
+ attr_accessor :partition
4328
+
4329
+ # A single model artifact item.
4330
+ # Corresponds to the JSON property `servingArtifact`
4331
+ # @return [Google::Apis::LanguageV1::XpsModelArtifactItem]
4332
+ attr_accessor :serving_artifact
4333
+
4334
+ # The name of servo model. Populated by uCAIP BE as part of online
4335
+ # PredictRequest.
4336
+ # Corresponds to the JSON property `servoModelName`
4337
+ # @return [String]
4338
+ attr_accessor :servo_model_name
4339
+
4340
+ # The name of the trained NL submodel.
4341
+ # Corresponds to the JSON property `submodelName`
4342
+ # @return [String]
4343
+ attr_accessor :submodel_name
4344
+
4345
+ # The type of trained NL submodel
4346
+ # Corresponds to the JSON property `submodelType`
4347
+ # @return [String]
4348
+ attr_accessor :submodel_type
4349
+
4350
+ # ## The fields below are only populated under uCAIP request scope. https://
4351
+ # cloud.google.com/ml-engine/docs/runtime-version-list
4352
+ # Corresponds to the JSON property `tfRuntimeVersion`
4353
+ # @return [String]
4354
+ attr_accessor :tf_runtime_version
4355
+
4356
+ # The servomatic model version number. Populated by uCAIP BE as part of online
4357
+ # PredictRequest.
4358
+ # Corresponds to the JSON property `versionNumber`
4359
+ # @return [Fixnum]
4360
+ attr_accessor :version_number
4361
+
4362
+ def initialize(**args)
4363
+ update!(**args)
4364
+ end
4365
+
4366
+ # Update properties of this object
4367
+ def update!(**args)
4368
+ @batch_prediction_model_gcs_uri = args[:batch_prediction_model_gcs_uri] if args.key?(:batch_prediction_model_gcs_uri)
4369
+ @online_prediction_model_gcs_uri = args[:online_prediction_model_gcs_uri] if args.key?(:online_prediction_model_gcs_uri)
4370
+ @partition = args[:partition] if args.key?(:partition)
4371
+ @serving_artifact = args[:serving_artifact] if args.key?(:serving_artifact)
4372
+ @servo_model_name = args[:servo_model_name] if args.key?(:servo_model_name)
4373
+ @submodel_name = args[:submodel_name] if args.key?(:submodel_name)
4374
+ @submodel_type = args[:submodel_type] if args.key?(:submodel_type)
4375
+ @tf_runtime_version = args[:tf_runtime_version] if args.key?(:tf_runtime_version)
4376
+ @version_number = args[:version_number] if args.key?(:version_number)
4377
+ end
4378
+ end
4379
+
4380
+ #
4381
+ class XpsTextExtractionEvaluationMetrics
4382
+ include Google::Apis::Core::Hashable
4383
+
4384
+ # ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next
4385
+ # tag: 16.
4386
+ # Corresponds to the JSON property `bestF1ConfidenceMetrics`
4387
+ # @return [Google::Apis::LanguageV1::XpsConfidenceMetricsEntry]
4388
+ attr_accessor :best_f1_confidence_metrics
4389
+
4390
+ # If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries
4391
+ # is an evaluation of the entire model across all labels. If the enclosing
4392
+ # EvaluationMetrics.label is set, confidence_metrics_entries applies to that
4393
+ # label.
4394
+ # Corresponds to the JSON property `confidenceMetricsEntries`
4395
+ # @return [Array<Google::Apis::LanguageV1::XpsConfidenceMetricsEntry>]
4396
+ attr_accessor :confidence_metrics_entries
4397
+
4398
+ # Confusion matrix of the model running the classification.
4399
+ # Corresponds to the JSON property `confusionMatrix`
4400
+ # @return [Google::Apis::LanguageV1::XpsConfusionMatrix]
4401
+ attr_accessor :confusion_matrix
4402
+
4403
+ # Only recall, precision, and f1_score will be set.
4404
+ # Corresponds to the JSON property `perLabelConfidenceMetrics`
4405
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsConfidenceMetricsEntry>]
4406
+ attr_accessor :per_label_confidence_metrics
4407
+
4408
+ def initialize(**args)
4409
+ update!(**args)
4410
+ end
4411
+
4412
+ # Update properties of this object
4413
+ def update!(**args)
4414
+ @best_f1_confidence_metrics = args[:best_f1_confidence_metrics] if args.key?(:best_f1_confidence_metrics)
4415
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
4416
+ @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
4417
+ @per_label_confidence_metrics = args[:per_label_confidence_metrics] if args.key?(:per_label_confidence_metrics)
4418
+ end
4419
+ end
4420
+
4421
+ # Model evaluation metrics for text sentiment problems.
4422
+ class XpsTextSentimentEvaluationMetrics
4423
+ include Google::Apis::Core::Hashable
4424
+
4425
+ # Confusion matrix of the model running the classification.
4426
+ # Corresponds to the JSON property `confusionMatrix`
4427
+ # @return [Google::Apis::LanguageV1::XpsConfusionMatrix]
4428
+ attr_accessor :confusion_matrix
4429
+
4430
+ # Output only. The harmonic mean of recall and precision.
4431
+ # Corresponds to the JSON property `f1Score`
4432
+ # @return [Float]
4433
+ attr_accessor :f1_score
4434
+
4435
+ # Output only. Linear weighted kappa. Only set for the overall model evaluation,
4436
+ # not for evaluation of a single annotation spec.
4437
+ # Corresponds to the JSON property `linearKappa`
4438
+ # @return [Float]
4439
+ attr_accessor :linear_kappa
4440
+
4441
+ # Output only. Mean absolute error. Only set for the overall model evaluation,
4442
+ # not for evaluation of a single annotation spec.
4443
+ # Corresponds to the JSON property `meanAbsoluteError`
4444
+ # @return [Float]
4445
+ attr_accessor :mean_absolute_error
4446
+
4447
+ # Output only. Mean squared error. Only set for the overall model evaluation,
4448
+ # not for evaluation of a single annotation spec.
4449
+ # Corresponds to the JSON property `meanSquaredError`
4450
+ # @return [Float]
4451
+ attr_accessor :mean_squared_error
4452
+
4453
+ # Output only. Precision.
4454
+ # Corresponds to the JSON property `precision`
4455
+ # @return [Float]
4456
+ attr_accessor :precision
4457
+
4458
+ # Output only. Quadratic weighted kappa. Only set for the overall model
4459
+ # evaluation, not for evaluation of a single annotation spec.
4460
+ # Corresponds to the JSON property `quadraticKappa`
4461
+ # @return [Float]
4462
+ attr_accessor :quadratic_kappa
4463
+
4464
+ # Output only. Recall.
4465
+ # Corresponds to the JSON property `recall`
4466
+ # @return [Float]
4467
+ attr_accessor :recall
4468
+
4469
+ def initialize(**args)
4470
+ update!(**args)
4471
+ end
4472
+
4473
+ # Update properties of this object
4474
+ def update!(**args)
4475
+ @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
4476
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
4477
+ @linear_kappa = args[:linear_kappa] if args.key?(:linear_kappa)
4478
+ @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
4479
+ @mean_squared_error = args[:mean_squared_error] if args.key?(:mean_squared_error)
4480
+ @precision = args[:precision] if args.key?(:precision)
4481
+ @quadratic_kappa = args[:quadratic_kappa] if args.key?(:quadratic_kappa)
4482
+ @recall = args[:recall] if args.key?(:recall)
4483
+ end
4484
+ end
4485
+
4486
+ # TextToSpeech train response
4487
+ class XpsTextToSpeechTrainResponse
4488
+ include Google::Apis::Core::Hashable
4489
+
4490
+ def initialize(**args)
4491
+ update!(**args)
4492
+ end
4493
+
4494
+ # Update properties of this object
4495
+ def update!(**args)
4496
+ end
4497
+ end
4498
+
4499
+ #
4500
+ class XpsTextTrainResponse
4501
+ include Google::Apis::Core::Hashable
4502
+
4503
+ # Component submodels.
4504
+ # Corresponds to the JSON property `componentModel`
4505
+ # @return [Array<Google::Apis::LanguageV1::XpsTextComponentModel>]
4506
+ attr_accessor :component_model
4507
+
4508
+ def initialize(**args)
4509
+ update!(**args)
4510
+ end
4511
+
4512
+ # Update properties of this object
4513
+ def update!(**args)
4514
+ @component_model = args[:component_model] if args.key?(:component_model)
4515
+ end
4516
+ end
4517
+
4518
+ # A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the
4519
+ # browser and in Node.js using JavaScript.
4520
+ class XpsTfJsFormat
4521
+ include Google::Apis::Core::Hashable
4522
+
4523
+ def initialize(**args)
4524
+ update!(**args)
4525
+ end
4526
+
4527
+ # Update properties of this object
4528
+ def update!(**args)
4529
+ end
4530
+ end
4531
+
4532
+ # LINT.IfChange A model format used for mobile and IoT devices. See https://www.
4533
+ # tensorflow.org/lite.
4534
+ class XpsTfLiteFormat
4535
+ include Google::Apis::Core::Hashable
4536
+
4537
+ def initialize(**args)
4538
+ update!(**args)
4539
+ end
4540
+
4541
+ # Update properties of this object
4542
+ def update!(**args)
4543
+ end
4544
+ end
4545
+
4546
+ # A tensorflow model format in SavedModel format.
4547
+ class XpsTfSavedModelFormat
4548
+ include Google::Apis::Core::Hashable
4549
+
4550
+ def initialize(**args)
4551
+ update!(**args)
4552
+ end
4553
+
4554
+ # Update properties of this object
4555
+ def update!(**args)
4556
+ end
4557
+ end
4558
+
4559
+ # The data statistics of a series of TIMESTAMP values.
4560
+ class XpsTimestampStats
4561
+ include Google::Apis::Core::Hashable
4562
+
4563
+ # Common statistics for a column with a specified data type.
4564
+ # Corresponds to the JSON property `commonStats`
4565
+ # @return [Google::Apis::LanguageV1::XpsCommonStats]
4566
+ attr_accessor :common_stats
4567
+
4568
+ # The string key is the pre-defined granularity. Currently supported:
4569
+ # hour_of_day, day_of_week, month_of_year. Granularities finer that the
4570
+ # granularity of timestamp data are not populated (e.g. if timestamps are at day
4571
+ # granularity, then hour_of_day is not populated).
4572
+ # Corresponds to the JSON property `granularStats`
4573
+ # @return [Hash<String,Google::Apis::LanguageV1::XpsTimestampStatsGranularStats>]
4574
+ attr_accessor :granular_stats
4575
+
4576
+ #
4577
+ # Corresponds to the JSON property `medianTimestampNanos`
4578
+ # @return [Fixnum]
4579
+ attr_accessor :median_timestamp_nanos
4580
+
4581
+ def initialize(**args)
4582
+ update!(**args)
4583
+ end
4584
+
4585
+ # Update properties of this object
4586
+ def update!(**args)
4587
+ @common_stats = args[:common_stats] if args.key?(:common_stats)
4588
+ @granular_stats = args[:granular_stats] if args.key?(:granular_stats)
4589
+ @median_timestamp_nanos = args[:median_timestamp_nanos] if args.key?(:median_timestamp_nanos)
4590
+ end
4591
+ end
4592
+
4593
+ # Stats split by a defined in context granularity.
4594
+ class XpsTimestampStatsGranularStats
4595
+ include Google::Apis::Core::Hashable
4596
+
4597
+ # A map from granularity key to example count for that key. E.g. for hour_of_day
4598
+ # `13` means 1pm, or for month_of_year `5` means May).
4599
+ # Corresponds to the JSON property `buckets`
4600
+ # @return [Hash<String,Fixnum>]
4601
+ attr_accessor :buckets
4602
+
4603
+ def initialize(**args)
4604
+ update!(**args)
4605
+ end
4606
+
4607
+ # Update properties of this object
4608
+ def update!(**args)
4609
+ @buckets = args[:buckets] if args.key?(:buckets)
4610
+ end
4611
+ end
4612
+
4613
+ # Track matching model metrics for a single track match threshold and multiple
4614
+ # label match confidence thresholds. Next tag: 6.
4615
+ class XpsTrackMetricsEntry
4616
+ include Google::Apis::Core::Hashable
4617
+
4618
+ # Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,.
4619
+ # ..,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.
4620
+ # Corresponds to the JSON property `confidenceMetricsEntries`
4621
+ # @return [Array<Google::Apis::LanguageV1::XpsTrackMetricsEntryConfidenceMetricsEntry>]
4622
+ attr_accessor :confidence_metrics_entries
4623
+
4624
+ # Output only. The intersection-over-union threshold value between bounding
4625
+ # boxes across frames used to compute this metric entry.
4626
+ # Corresponds to the JSON property `iouThreshold`
4627
+ # @return [Float]
4628
+ attr_accessor :iou_threshold
4629
+
4630
+ # Output only. The mean bounding box iou over all confidence thresholds.
4631
+ # Corresponds to the JSON property `meanBoundingBoxIou`
4632
+ # @return [Float]
4633
+ attr_accessor :mean_bounding_box_iou
4634
+
4635
+ # Output only. The mean mismatch rate over all confidence thresholds.
4636
+ # Corresponds to the JSON property `meanMismatchRate`
4637
+ # @return [Float]
4638
+ attr_accessor :mean_mismatch_rate
4639
+
4640
+ # Output only. The mean average precision over all confidence thresholds.
4641
+ # Corresponds to the JSON property `meanTrackingAveragePrecision`
4642
+ # @return [Float]
4643
+ attr_accessor :mean_tracking_average_precision
4644
+
4645
+ def initialize(**args)
4646
+ update!(**args)
4647
+ end
4648
+
4649
+ # Update properties of this object
4650
+ def update!(**args)
4651
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
4652
+ @iou_threshold = args[:iou_threshold] if args.key?(:iou_threshold)
4653
+ @mean_bounding_box_iou = args[:mean_bounding_box_iou] if args.key?(:mean_bounding_box_iou)
4654
+ @mean_mismatch_rate = args[:mean_mismatch_rate] if args.key?(:mean_mismatch_rate)
4655
+ @mean_tracking_average_precision = args[:mean_tracking_average_precision] if args.key?(:mean_tracking_average_precision)
4656
+ end
4657
+ end
4658
+
4659
+ # Metrics for a single confidence threshold. Next tag: 6.
4660
+ class XpsTrackMetricsEntryConfidenceMetricsEntry
4661
+ include Google::Apis::Core::Hashable
4662
+
4663
+ # Output only. Bounding box intersection-over-union precision. Measures how well
4664
+ # the bounding boxes overlap between each other (e.g. complete overlap or just
4665
+ # barely above iou_threshold).
4666
+ # Corresponds to the JSON property `boundingBoxIou`
4667
+ # @return [Float]
4668
+ attr_accessor :bounding_box_iou
4669
+
4670
+ # Output only. The confidence threshold value used to compute the metrics.
4671
+ # Corresponds to the JSON property `confidenceThreshold`
4672
+ # @return [Float]
4673
+ attr_accessor :confidence_threshold
4674
+
4675
+ # Output only. Mismatch rate, which measures the tracking consistency, i.e.
4676
+ # correctness of instance ID continuity.
4677
+ # Corresponds to the JSON property `mismatchRate`
4678
+ # @return [Float]
4679
+ attr_accessor :mismatch_rate
4680
+
4681
+ # Output only. Tracking precision.
4682
+ # Corresponds to the JSON property `trackingPrecision`
4683
+ # @return [Float]
4684
+ attr_accessor :tracking_precision
4685
+
4686
+ # Output only. Tracking recall.
4687
+ # Corresponds to the JSON property `trackingRecall`
4688
+ # @return [Float]
4689
+ attr_accessor :tracking_recall
4690
+
4691
+ def initialize(**args)
4692
+ update!(**args)
4693
+ end
4694
+
4695
+ # Update properties of this object
4696
+ def update!(**args)
4697
+ @bounding_box_iou = args[:bounding_box_iou] if args.key?(:bounding_box_iou)
4698
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
4699
+ @mismatch_rate = args[:mismatch_rate] if args.key?(:mismatch_rate)
4700
+ @tracking_precision = args[:tracking_precision] if args.key?(:tracking_precision)
4701
+ @tracking_recall = args[:tracking_recall] if args.key?(:tracking_recall)
4702
+ end
4703
+ end
4704
+
4705
+ # Next ID: 18
4706
+ class XpsTrainResponse
4707
+ include Google::Apis::Core::Hashable
4708
+
4709
+ # Estimated model size in bytes once deployed.
4710
+ # Corresponds to the JSON property `deployedModelSizeBytes`
4711
+ # @return [Fixnum]
4712
+ attr_accessor :deployed_model_size_bytes
4713
+
4714
+ # Optional vision model error analysis configuration. The field is set when
4715
+ # model error analysis is enabled in the training request. The results of error
4716
+ # analysis will be binded together with evaluation results (in the format of
4717
+ # AnnotatedExample).
4718
+ # Corresponds to the JSON property `errorAnalysisConfigs`
4719
+ # @return [Array<Google::Apis::LanguageV1::XpsVisionErrorAnalysisConfig>]
4720
+ attr_accessor :error_analysis_configs
4721
+
4722
+ # Set of examples or input sources.
4723
+ # Corresponds to the JSON property `evaluatedExampleSet`
4724
+ # @return [Google::Apis::LanguageV1::XpsExampleSet]
4725
+ attr_accessor :evaluated_example_set
4726
+
4727
+ # Specifies location of model evaluation metrics.
4728
+ # Corresponds to the JSON property `evaluationMetricsSet`
4729
+ # @return [Google::Apis::LanguageV1::XpsEvaluationMetricsSet]
4730
+ attr_accessor :evaluation_metrics_set
4731
+
4732
+ # VisionExplanationConfig for XAI on test set. Optional for when XAI is enable
4733
+ # in training request.
4734
+ # Corresponds to the JSON property `explanationConfigs`
4735
+ # @return [Array<Google::Apis::LanguageV1::XpsResponseExplanationSpec>]
4736
+ attr_accessor :explanation_configs
4737
+
4738
+ #
4739
+ # Corresponds to the JSON property `imageClassificationTrainResp`
4740
+ # @return [Google::Apis::LanguageV1::XpsImageClassificationTrainResponse]
4741
+ attr_accessor :image_classification_train_resp
4742
+
4743
+ #
4744
+ # Corresponds to the JSON property `imageObjectDetectionTrainResp`
4745
+ # @return [Google::Apis::LanguageV1::XpsImageObjectDetectionModelSpec]
4746
+ attr_accessor :image_object_detection_train_resp
4747
+
4748
+ #
4749
+ # Corresponds to the JSON property `imageSegmentationTrainResp`
4750
+ # @return [Google::Apis::LanguageV1::XpsImageSegmentationTrainResponse]
4751
+ attr_accessor :image_segmentation_train_resp
4752
+
4753
+ # Token that represents the trained model. This is considered immutable and is
4754
+ # persisted in AutoML. xPS can put their own proto in the byte string, to e.g.
4755
+ # point to the model checkpoints. The token is passed to other xPS APIs to refer
4756
+ # to the model.
4757
+ # Corresponds to the JSON property `modelToken`
4758
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
4759
+ # @return [String]
4760
+ attr_accessor :model_token
4761
+
4762
+ #
4763
+ # Corresponds to the JSON property `speechTrainResp`
4764
+ # @return [Google::Apis::LanguageV1::XpsSpeechModelSpec]
4765
+ attr_accessor :speech_train_resp
4766
+
4767
+ #
4768
+ # Corresponds to the JSON property `tablesTrainResp`
4769
+ # @return [Google::Apis::LanguageV1::XpsTablesTrainResponse]
4770
+ attr_accessor :tables_train_resp
4771
+
4772
+ # TextToSpeech train response
4773
+ # Corresponds to the JSON property `textToSpeechTrainResp`
4774
+ # @return [Google::Apis::LanguageV1::XpsTextToSpeechTrainResponse]
4775
+ attr_accessor :text_to_speech_train_resp
4776
+
4777
+ # Will only be needed for uCAIP from Beta.
4778
+ # Corresponds to the JSON property `textTrainResp`
4779
+ # @return [Google::Apis::LanguageV1::XpsTextTrainResponse]
4780
+ attr_accessor :text_train_resp
4781
+
4782
+ # Train response for translation.
4783
+ # Corresponds to the JSON property `translationTrainResp`
4784
+ # @return [Google::Apis::LanguageV1::XpsTranslationTrainResponse]
4785
+ attr_accessor :translation_train_resp
4786
+
4787
+ #
4788
+ # Corresponds to the JSON property `videoActionRecognitionTrainResp`
4789
+ # @return [Google::Apis::LanguageV1::XpsVideoActionRecognitionTrainResponse]
4790
+ attr_accessor :video_action_recognition_train_resp
4791
+
4792
+ #
4793
+ # Corresponds to the JSON property `videoClassificationTrainResp`
4794
+ # @return [Google::Apis::LanguageV1::XpsVideoClassificationTrainResponse]
4795
+ attr_accessor :video_classification_train_resp
4796
+
4797
+ #
4798
+ # Corresponds to the JSON property `videoObjectTrackingTrainResp`
4799
+ # @return [Google::Apis::LanguageV1::XpsVideoObjectTrackingTrainResponse]
4800
+ attr_accessor :video_object_tracking_train_resp
4801
+
4802
+ def initialize(**args)
4803
+ update!(**args)
4804
+ end
4805
+
4806
+ # Update properties of this object
4807
+ def update!(**args)
4808
+ @deployed_model_size_bytes = args[:deployed_model_size_bytes] if args.key?(:deployed_model_size_bytes)
4809
+ @error_analysis_configs = args[:error_analysis_configs] if args.key?(:error_analysis_configs)
4810
+ @evaluated_example_set = args[:evaluated_example_set] if args.key?(:evaluated_example_set)
4811
+ @evaluation_metrics_set = args[:evaluation_metrics_set] if args.key?(:evaluation_metrics_set)
4812
+ @explanation_configs = args[:explanation_configs] if args.key?(:explanation_configs)
4813
+ @image_classification_train_resp = args[:image_classification_train_resp] if args.key?(:image_classification_train_resp)
4814
+ @image_object_detection_train_resp = args[:image_object_detection_train_resp] if args.key?(:image_object_detection_train_resp)
4815
+ @image_segmentation_train_resp = args[:image_segmentation_train_resp] if args.key?(:image_segmentation_train_resp)
4816
+ @model_token = args[:model_token] if args.key?(:model_token)
4817
+ @speech_train_resp = args[:speech_train_resp] if args.key?(:speech_train_resp)
4818
+ @tables_train_resp = args[:tables_train_resp] if args.key?(:tables_train_resp)
4819
+ @text_to_speech_train_resp = args[:text_to_speech_train_resp] if args.key?(:text_to_speech_train_resp)
4820
+ @text_train_resp = args[:text_train_resp] if args.key?(:text_train_resp)
4821
+ @translation_train_resp = args[:translation_train_resp] if args.key?(:translation_train_resp)
4822
+ @video_action_recognition_train_resp = args[:video_action_recognition_train_resp] if args.key?(:video_action_recognition_train_resp)
4823
+ @video_classification_train_resp = args[:video_classification_train_resp] if args.key?(:video_classification_train_resp)
4824
+ @video_object_tracking_train_resp = args[:video_object_tracking_train_resp] if args.key?(:video_object_tracking_train_resp)
4825
+ end
4826
+ end
4827
+
4828
+ #
4829
+ class XpsTrainingObjectivePoint
4830
+ include Google::Apis::Core::Hashable
4831
+
4832
+ # The time at which this point was recorded.
4833
+ # Corresponds to the JSON property `createTime`
4834
+ # @return [String]
4835
+ attr_accessor :create_time
4836
+
4837
+ # The objective value when this point was recorded.
4838
+ # Corresponds to the JSON property `value`
4839
+ # @return [Float]
4840
+ attr_accessor :value
4841
+
4842
+ def initialize(**args)
4843
+ update!(**args)
4844
+ end
4845
+
4846
+ # Update properties of this object
4847
+ def update!(**args)
4848
+ @create_time = args[:create_time] if args.key?(:create_time)
4849
+ @value = args[:value] if args.key?(:value)
4850
+ end
4851
+ end
4852
+
4853
+ # Evaluation metrics for the dataset.
4854
+ class XpsTranslationEvaluationMetrics
4855
+ include Google::Apis::Core::Hashable
4856
+
4857
+ # BLEU score for base model.
4858
+ # Corresponds to the JSON property `baseBleuScore`
4859
+ # @return [Float]
4860
+ attr_accessor :base_bleu_score
4861
+
4862
+ # BLEU score.
4863
+ # Corresponds to the JSON property `bleuScore`
4864
+ # @return [Float]
4865
+ attr_accessor :bleu_score
4866
+
4867
+ def initialize(**args)
4868
+ update!(**args)
4869
+ end
4870
+
4871
+ # Update properties of this object
4872
+ def update!(**args)
4873
+ @base_bleu_score = args[:base_bleu_score] if args.key?(:base_bleu_score)
4874
+ @bleu_score = args[:bleu_score] if args.key?(:bleu_score)
4875
+ end
4876
+ end
4877
+
4878
+ # Translation preprocess response.
4879
+ class XpsTranslationPreprocessResponse
4880
+ include Google::Apis::Core::Hashable
4881
+
4882
+ # Total example count parsed.
4883
+ # Corresponds to the JSON property `parsedExampleCount`
4884
+ # @return [Fixnum]
4885
+ attr_accessor :parsed_example_count
4886
+
4887
+ # Total valid example count.
4888
+ # Corresponds to the JSON property `validExampleCount`
4889
+ # @return [Fixnum]
4890
+ attr_accessor :valid_example_count
4891
+
4892
+ def initialize(**args)
4893
+ update!(**args)
4894
+ end
4895
+
4896
+ # Update properties of this object
4897
+ def update!(**args)
4898
+ @parsed_example_count = args[:parsed_example_count] if args.key?(:parsed_example_count)
4899
+ @valid_example_count = args[:valid_example_count] if args.key?(:valid_example_count)
4900
+ end
4901
+ end
4902
+
4903
+ # Train response for translation.
4904
+ class XpsTranslationTrainResponse
4905
+ include Google::Apis::Core::Hashable
4906
+
4907
+ # Type of the model.
4908
+ # Corresponds to the JSON property `modelType`
4909
+ # @return [String]
4910
+ attr_accessor :model_type
4911
+
4912
+ def initialize(**args)
4913
+ update!(**args)
4914
+ end
4915
+
4916
+ # Update properties of this object
4917
+ def update!(**args)
4918
+ @model_type = args[:model_type] if args.key?(:model_type)
4919
+ end
4920
+ end
4921
+
4922
+ # Metrics for a tuning job generated, will get forwarded to Stackdriver as model
4923
+ # tuning logs. Setting this as a standalone message out of CreateModelMetadata
4924
+ # to avoid confusion as we expose this message only to users.
4925
+ class XpsTuningTrial
4926
+ include Google::Apis::Core::Hashable
4927
+
4928
+ # A description of Tables model structure.
4929
+ # Corresponds to the JSON property `modelStructure`
4930
+ # @return [Google::Apis::LanguageV1::XpsTablesModelStructure]
4931
+ attr_accessor :model_structure
4932
+
4933
+ # The optimization objective evaluation of the eval split data.
4934
+ # Corresponds to the JSON property `trainingObjectivePoint`
4935
+ # @return [Google::Apis::LanguageV1::XpsTrainingObjectivePoint]
4936
+ attr_accessor :training_objective_point
4937
+
4938
+ def initialize(**args)
4939
+ update!(**args)
4940
+ end
4941
+
4942
+ # Update properties of this object
4943
+ def update!(**args)
4944
+ @model_structure = args[:model_structure] if args.key?(:model_structure)
4945
+ @training_objective_point = args[:training_objective_point] if args.key?(:training_objective_point)
4946
+ end
4947
+ end
4948
+
4949
+ # The Evaluation metrics entry given a specific precision_window_length.
4950
+ class XpsVideoActionMetricsEntry
4951
+ include Google::Apis::Core::Hashable
4952
+
4953
+ # Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,
4954
+ # 0.97,0.98,0.99.
4955
+ # Corresponds to the JSON property `confidenceMetricsEntries`
4956
+ # @return [Array<Google::Apis::LanguageV1::XpsVideoActionMetricsEntryConfidenceMetricsEntry>]
4957
+ attr_accessor :confidence_metrics_entries
4958
+
4959
+ # The mean average precision.
4960
+ # Corresponds to the JSON property `meanAveragePrecision`
4961
+ # @return [Float]
4962
+ attr_accessor :mean_average_precision
4963
+
4964
+ # This VideoActionMetricsEntry is calculated based on this prediction window
4965
+ # length. If the predicted action's timestamp is inside the time window whose
4966
+ # center is the ground truth action's timestamp with this specific length, the
4967
+ # prediction result is treated as a true positive.
4968
+ # Corresponds to the JSON property `precisionWindowLength`
4969
+ # @return [String]
4970
+ attr_accessor :precision_window_length
4971
+
4972
+ def initialize(**args)
4973
+ update!(**args)
4974
+ end
4975
+
4976
+ # Update properties of this object
4977
+ def update!(**args)
4978
+ @confidence_metrics_entries = args[:confidence_metrics_entries] if args.key?(:confidence_metrics_entries)
4979
+ @mean_average_precision = args[:mean_average_precision] if args.key?(:mean_average_precision)
4980
+ @precision_window_length = args[:precision_window_length] if args.key?(:precision_window_length)
4981
+ end
4982
+ end
4983
+
4984
+ # Metrics for a single confidence threshold.
4985
+ class XpsVideoActionMetricsEntryConfidenceMetricsEntry
4986
+ include Google::Apis::Core::Hashable
4987
+
4988
+ # Output only. The confidence threshold value used to compute the metrics.
4989
+ # Corresponds to the JSON property `confidenceThreshold`
4990
+ # @return [Float]
4991
+ attr_accessor :confidence_threshold
4992
+
4993
+ # Output only. The harmonic mean of recall and precision.
4994
+ # Corresponds to the JSON property `f1Score`
4995
+ # @return [Float]
4996
+ attr_accessor :f1_score
4997
+
4998
+ # Output only. Precision for the given confidence threshold.
4999
+ # Corresponds to the JSON property `precision`
5000
+ # @return [Float]
5001
+ attr_accessor :precision
5002
+
5003
+ # Output only. Recall for the given confidence threshold.
5004
+ # Corresponds to the JSON property `recall`
5005
+ # @return [Float]
5006
+ attr_accessor :recall
5007
+
5008
+ def initialize(**args)
5009
+ update!(**args)
5010
+ end
5011
+
5012
+ # Update properties of this object
5013
+ def update!(**args)
5014
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
5015
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
5016
+ @precision = args[:precision] if args.key?(:precision)
5017
+ @recall = args[:recall] if args.key?(:recall)
5018
+ end
5019
+ end
5020
+
5021
+ # Model evaluation metrics for video action recognition.
5022
+ class XpsVideoActionRecognitionEvaluationMetrics
5023
+ include Google::Apis::Core::Hashable
5024
+
5025
+ # Output only. The number of ground truth actions used to create this evaluation.
5026
+ # Corresponds to the JSON property `evaluatedActionCount`
5027
+ # @return [Fixnum]
5028
+ attr_accessor :evaluated_action_count
5029
+
5030
+ # Output only. The metric entries for precision window lengths: 1s,2s,3s,4s, 5s.
5031
+ # Corresponds to the JSON property `videoActionMetricsEntries`
5032
+ # @return [Array<Google::Apis::LanguageV1::XpsVideoActionMetricsEntry>]
5033
+ attr_accessor :video_action_metrics_entries
5034
+
5035
+ def initialize(**args)
5036
+ update!(**args)
5037
+ end
5038
+
5039
+ # Update properties of this object
5040
+ def update!(**args)
5041
+ @evaluated_action_count = args[:evaluated_action_count] if args.key?(:evaluated_action_count)
5042
+ @video_action_metrics_entries = args[:video_action_metrics_entries] if args.key?(:video_action_metrics_entries)
5043
+ end
5044
+ end
5045
+
5046
+ #
5047
+ class XpsVideoActionRecognitionTrainResponse
5048
+ include Google::Apis::Core::Hashable
5049
+
5050
+ # ## The fields below are only populated under uCAIP request scope.
5051
+ # Corresponds to the JSON property `modelArtifactSpec`
5052
+ # @return [Google::Apis::LanguageV1::XpsVideoModelArtifactSpec]
5053
+ attr_accessor :model_artifact_spec
5054
+
5055
+ # The actual train cost of creating this model, expressed in node seconds, i.e.
5056
+ # 3,600 value in this field means 1 node hour.
5057
+ # Corresponds to the JSON property `trainCostNodeSeconds`
5058
+ # @return [Fixnum]
5059
+ attr_accessor :train_cost_node_seconds
5060
+
5061
+ def initialize(**args)
5062
+ update!(**args)
5063
+ end
5064
+
5065
+ # Update properties of this object
5066
+ def update!(**args)
5067
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
5068
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
5069
+ end
5070
+ end
5071
+
5072
+ #
5073
+ class XpsVideoBatchPredictOperationMetadata
5074
+ include Google::Apis::Core::Hashable
5075
+
5076
+ # All the partial batch prediction results that are completed at the moment.
5077
+ # Output examples are sorted by completion time. The order will not be changed.
5078
+ # Each output example should be the path of a single RecordIO file of
5079
+ # AnnotatedExamples.
5080
+ # Corresponds to the JSON property `outputExamples`
5081
+ # @return [Array<String>]
5082
+ attr_accessor :output_examples
5083
+
5084
+ def initialize(**args)
5085
+ update!(**args)
5086
+ end
5087
+
5088
+ # Update properties of this object
5089
+ def update!(**args)
5090
+ @output_examples = args[:output_examples] if args.key?(:output_examples)
5091
+ end
5092
+ end
5093
+
5094
+ #
5095
+ class XpsVideoClassificationTrainResponse
5096
+ include Google::Apis::Core::Hashable
5097
+
5098
+ # ## The fields below are only populated under uCAIP request scope.
5099
+ # Corresponds to the JSON property `modelArtifactSpec`
5100
+ # @return [Google::Apis::LanguageV1::XpsVideoModelArtifactSpec]
5101
+ attr_accessor :model_artifact_spec
5102
+
5103
+ # The actual train cost of creating this model, expressed in node seconds, i.e.
5104
+ # 3,600 value in this field means 1 node hour.
5105
+ # Corresponds to the JSON property `trainCostNodeSeconds`
5106
+ # @return [Fixnum]
5107
+ attr_accessor :train_cost_node_seconds
5108
+
5109
+ def initialize(**args)
5110
+ update!(**args)
5111
+ end
5112
+
5113
+ # Update properties of this object
5114
+ def update!(**args)
5115
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
5116
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
5117
+ end
5118
+ end
5119
+
5120
+ # Information of downloadable models that are pre-generated as part of training
5121
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
5122
+ # request from user, AutoMl backend can serve the pre-generated models to user
5123
+ # if exists (by copying the files from internal path to user provided location),
5124
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
5125
+ # on the fly with the requesting format.
5126
+ class XpsVideoExportModelSpec
5127
+ include Google::Apis::Core::Hashable
5128
+
5129
+ # Contains the model format and internal location of the model files to be
5130
+ # exported/downloaded. Use the GCS bucket name which is provided via
5131
+ # TrainRequest.gcs_bucket_name to store the model files.
5132
+ # Corresponds to the JSON property `exportModelOutputConfig`
5133
+ # @return [Array<Google::Apis::LanguageV1::XpsExportModelOutputConfig>]
5134
+ attr_accessor :export_model_output_config
5135
+
5136
+ def initialize(**args)
5137
+ update!(**args)
5138
+ end
5139
+
5140
+ # Update properties of this object
5141
+ def update!(**args)
5142
+ @export_model_output_config = args[:export_model_output_config] if args.key?(:export_model_output_config)
5143
+ end
5144
+ end
5145
+
5146
+ #
5147
+ class XpsVideoModelArtifactSpec
5148
+ include Google::Apis::Core::Hashable
5149
+
5150
+ # The model binary files in different formats for model export.
5151
+ # Corresponds to the JSON property `exportArtifact`
5152
+ # @return [Array<Google::Apis::LanguageV1::XpsModelArtifactItem>]
5153
+ attr_accessor :export_artifact
5154
+
5155
+ # A single model artifact item.
5156
+ # Corresponds to the JSON property `servingArtifact`
5157
+ # @return [Google::Apis::LanguageV1::XpsModelArtifactItem]
5158
+ attr_accessor :serving_artifact
5159
+
5160
+ def initialize(**args)
5161
+ update!(**args)
5162
+ end
5163
+
5164
+ # Update properties of this object
5165
+ def update!(**args)
5166
+ @export_artifact = args[:export_artifact] if args.key?(:export_artifact)
5167
+ @serving_artifact = args[:serving_artifact] if args.key?(:serving_artifact)
5168
+ end
5169
+ end
5170
+
5171
+ # Model evaluation metrics for ObjectTracking problems. Next tag: 10.
5172
+ class XpsVideoObjectTrackingEvaluationMetrics
5173
+ include Google::Apis::Core::Hashable
5174
+
5175
+ # Output only. The single metric for bounding boxes evaluation: the
5176
+ # mean_average_precision averaged over all bounding_box_metrics_entries.
5177
+ # Corresponds to the JSON property `boundingBoxMeanAveragePrecision`
5178
+ # @return [Float]
5179
+ attr_accessor :bounding_box_mean_average_precision
5180
+
5181
+ # Output only. The bounding boxes match metrics for each Intersection-over-union
5182
+ # threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
5183
+ # Corresponds to the JSON property `boundingBoxMetricsEntries`
5184
+ # @return [Array<Google::Apis::LanguageV1::XpsBoundingBoxMetricsEntry>]
5185
+ attr_accessor :bounding_box_metrics_entries
5186
+
5187
+ # The number of bounding boxes used for model evaluation.
5188
+ # Corresponds to the JSON property `evaluatedBoundingboxCount`
5189
+ # @return [Fixnum]
5190
+ attr_accessor :evaluated_boundingbox_count
5191
+
5192
+ # The number of video frames used for model evaluation.
5193
+ # Corresponds to the JSON property `evaluatedFrameCount`
5194
+ # @return [Fixnum]
5195
+ attr_accessor :evaluated_frame_count
5196
+
5197
+ # The number of tracks used for model evaluation.
5198
+ # Corresponds to the JSON property `evaluatedTrackCount`
5199
+ # @return [Fixnum]
5200
+ attr_accessor :evaluated_track_count
5201
+
5202
+ # Output only. The single metric for tracks accuracy evaluation: the
5203
+ # mean_average_precision averaged over all track_metrics_entries.
5204
+ # Corresponds to the JSON property `trackMeanAveragePrecision`
5205
+ # @return [Float]
5206
+ attr_accessor :track_mean_average_precision
5207
+
5208
+ # Output only. The single metric for tracks bounding box iou evaluation: the
5209
+ # mean_bounding_box_iou averaged over all track_metrics_entries.
5210
+ # Corresponds to the JSON property `trackMeanBoundingBoxIou`
5211
+ # @return [Float]
5212
+ attr_accessor :track_mean_bounding_box_iou
5213
+
5214
+ # Output only. The single metric for tracking consistency evaluation: the
5215
+ # mean_mismatch_rate averaged over all track_metrics_entries.
5216
+ # Corresponds to the JSON property `trackMeanMismatchRate`
5217
+ # @return [Float]
5218
+ attr_accessor :track_mean_mismatch_rate
5219
+
5220
+ # Output only. The tracks match metrics for each Intersection-over-union
5221
+ # threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
5222
+ # Corresponds to the JSON property `trackMetricsEntries`
5223
+ # @return [Array<Google::Apis::LanguageV1::XpsTrackMetricsEntry>]
5224
+ attr_accessor :track_metrics_entries
5225
+
5226
+ def initialize(**args)
5227
+ update!(**args)
5228
+ end
5229
+
5230
+ # Update properties of this object
5231
+ def update!(**args)
5232
+ @bounding_box_mean_average_precision = args[:bounding_box_mean_average_precision] if args.key?(:bounding_box_mean_average_precision)
5233
+ @bounding_box_metrics_entries = args[:bounding_box_metrics_entries] if args.key?(:bounding_box_metrics_entries)
5234
+ @evaluated_boundingbox_count = args[:evaluated_boundingbox_count] if args.key?(:evaluated_boundingbox_count)
5235
+ @evaluated_frame_count = args[:evaluated_frame_count] if args.key?(:evaluated_frame_count)
5236
+ @evaluated_track_count = args[:evaluated_track_count] if args.key?(:evaluated_track_count)
5237
+ @track_mean_average_precision = args[:track_mean_average_precision] if args.key?(:track_mean_average_precision)
5238
+ @track_mean_bounding_box_iou = args[:track_mean_bounding_box_iou] if args.key?(:track_mean_bounding_box_iou)
5239
+ @track_mean_mismatch_rate = args[:track_mean_mismatch_rate] if args.key?(:track_mean_mismatch_rate)
5240
+ @track_metrics_entries = args[:track_metrics_entries] if args.key?(:track_metrics_entries)
5241
+ end
5242
+ end
5243
+
5244
+ #
5245
+ class XpsVideoObjectTrackingTrainResponse
5246
+ include Google::Apis::Core::Hashable
5247
+
5248
+ # Information of downloadable models that are pre-generated as part of training
5249
+ # flow and will be persisted in AutoMl backend. Upon receiving ExportModel
5250
+ # request from user, AutoMl backend can serve the pre-generated models to user
5251
+ # if exists (by copying the files from internal path to user provided location),
5252
+ # otherwise, AutoMl backend will call xPS ExportModel API to generate the model
5253
+ # on the fly with the requesting format.
5254
+ # Corresponds to the JSON property `exportModelSpec`
5255
+ # @return [Google::Apis::LanguageV1::XpsVideoExportModelSpec]
5256
+ attr_accessor :export_model_spec
5257
+
5258
+ # ## The fields below are only populated under uCAIP request scope.
5259
+ # Corresponds to the JSON property `modelArtifactSpec`
5260
+ # @return [Google::Apis::LanguageV1::XpsVideoModelArtifactSpec]
5261
+ attr_accessor :model_artifact_spec
5262
+
5263
+ # The actual train cost of creating this model, expressed in node seconds, i.e.
5264
+ # 3,600 value in this field means 1 node hour.
5265
+ # Corresponds to the JSON property `trainCostNodeSeconds`
5266
+ # @return [Fixnum]
5267
+ attr_accessor :train_cost_node_seconds
5268
+
5269
+ def initialize(**args)
5270
+ update!(**args)
5271
+ end
5272
+
5273
+ # Update properties of this object
5274
+ def update!(**args)
5275
+ @export_model_spec = args[:export_model_spec] if args.key?(:export_model_spec)
5276
+ @model_artifact_spec = args[:model_artifact_spec] if args.key?(:model_artifact_spec)
5277
+ @train_cost_node_seconds = args[:train_cost_node_seconds] if args.key?(:train_cost_node_seconds)
5278
+ end
5279
+ end
5280
+
5281
+ #
5282
+ class XpsVideoTrainingOperationMetadata
5283
+ include Google::Apis::Core::Hashable
5284
+
5285
+ # This is an estimation of the node hours necessary for training a model,
5286
+ # expressed in milli node hours (i.e. 1,000 value in this field means 1 node
5287
+ # hour). A node hour represents the time a virtual machine spends running your
5288
+ # training job. The cost of one node running for one hour is a node hour.
5289
+ # Corresponds to the JSON property `trainCostMilliNodeHour`
5290
+ # @return [Fixnum]
5291
+ attr_accessor :train_cost_milli_node_hour
5292
+
5293
+ def initialize(**args)
5294
+ update!(**args)
5295
+ end
5296
+
5297
+ # Update properties of this object
5298
+ def update!(**args)
5299
+ @train_cost_milli_node_hour = args[:train_cost_milli_node_hour] if args.key?(:train_cost_milli_node_hour)
5300
+ end
5301
+ end
5302
+
5303
+ # The vision model error analysis configuration. Next tag: 3
5304
+ class XpsVisionErrorAnalysisConfig
5305
+ include Google::Apis::Core::Hashable
5306
+
5307
+ # The number of query examples in error analysis.
5308
+ # Corresponds to the JSON property `exampleCount`
5309
+ # @return [Fixnum]
5310
+ attr_accessor :example_count
5311
+
5312
+ # The query type used in retrieval. The enum values are frozen in the
5313
+ # foreseeable future.
5314
+ # Corresponds to the JSON property `queryType`
5315
+ # @return [String]
5316
+ attr_accessor :query_type
5317
+
5318
+ def initialize(**args)
5319
+ update!(**args)
5320
+ end
5321
+
5322
+ # Update properties of this object
5323
+ def update!(**args)
5324
+ @example_count = args[:example_count] if args.key?(:example_count)
5325
+ @query_type = args[:query_type] if args.key?(:query_type)
5326
+ end
5327
+ end
5328
+
5329
+ #
5330
+ class XpsVisionTrainingOperationMetadata
5331
+ include Google::Apis::Core::Hashable
5332
+
5333
+ # Infra Usage of billing metrics. Next ID: 6
5334
+ # Corresponds to the JSON property `explanationUsage`
5335
+ # @return [Google::Apis::LanguageV1::InfraUsage]
5336
+ attr_accessor :explanation_usage
5337
+
5338
+ def initialize(**args)
5339
+ update!(**args)
5340
+ end
5341
+
5342
+ # Update properties of this object
5343
+ def update!(**args)
5344
+ @explanation_usage = args[:explanation_usage] if args.key?(:explanation_usage)
5345
+ end
5346
+ end
5347
+
5348
+ # Visualization configurations for image explanation.
5349
+ class XpsVisualization
5350
+ include Google::Apis::Core::Hashable
5351
+
5352
+ # Excludes attributions below the specified percentile, from the highlighted
5353
+ # areas. Defaults to 62.
5354
+ # Corresponds to the JSON property `clipPercentLowerbound`
5355
+ # @return [Float]
5356
+ attr_accessor :clip_percent_lowerbound
5357
+
5358
+ # Excludes attributions above the specified percentile from the highlighted
5359
+ # areas. Using the clip_percent_upperbound and clip_percent_lowerbound together
5360
+ # can be useful for filtering out noise and making it easier to see areas of
5361
+ # strong attribution. Defaults to 99.9.
5362
+ # Corresponds to the JSON property `clipPercentUpperbound`
5363
+ # @return [Float]
5364
+ attr_accessor :clip_percent_upperbound
5365
+
5366
+ # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for
5367
+ # Integrated Gradients attribution, which shows positive attributions in green
5368
+ # and negative in pink. Defaults to VIRIDIS for XRAI attribution, which
5369
+ # highlights the most influential regions in yellow and the least influential in
5370
+ # blue.
5371
+ # Corresponds to the JSON property `colorMap`
5372
+ # @return [String]
5373
+ attr_accessor :color_map
5374
+
5375
+ # How the original image is displayed in the visualization. Adjusting the
5376
+ # overlay can help increase visual clarity if the original image makes it
5377
+ # difficult to view the visualization. Defaults to NONE.
5378
+ # Corresponds to the JSON property `overlayType`
5379
+ # @return [String]
5380
+ attr_accessor :overlay_type
5381
+
5382
+ # Whether to only highlight pixels with positive contributions, negative or both.
5383
+ # Defaults to POSITIVE.
5384
+ # Corresponds to the JSON property `polarity`
5385
+ # @return [String]
5386
+ attr_accessor :polarity
5387
+
5388
+ # Type of the image visualization. Only applicable to Integrated Gradients
5389
+ # attribution. OUTLINES shows regions of attribution, while PIXELS shows per-
5390
+ # pixel attribution. Defaults to OUTLINES.
5391
+ # Corresponds to the JSON property `type`
5392
+ # @return [String]
5393
+ attr_accessor :type
5394
+
5395
+ def initialize(**args)
5396
+ update!(**args)
5397
+ end
5398
+
5399
+ # Update properties of this object
5400
+ def update!(**args)
5401
+ @clip_percent_lowerbound = args[:clip_percent_lowerbound] if args.key?(:clip_percent_lowerbound)
5402
+ @clip_percent_upperbound = args[:clip_percent_upperbound] if args.key?(:clip_percent_upperbound)
5403
+ @color_map = args[:color_map] if args.key?(:color_map)
5404
+ @overlay_type = args[:overlay_type] if args.key?(:overlay_type)
5405
+ @polarity = args[:polarity] if args.key?(:polarity)
5406
+ @type = args[:type] if args.key?(:type)
5407
+ end
5408
+ end
5409
+
5410
+ #
5411
+ class XpsXpsOperationMetadata
5412
+ include Google::Apis::Core::Hashable
5413
+
5414
+ # Optional. XPS server can opt to provide example count of the long running
5415
+ # operation (e.g. training, data importing, batch prediction).
5416
+ # Corresponds to the JSON property `exampleCount`
5417
+ # @return [Fixnum]
5418
+ attr_accessor :example_count
5419
+
5420
+ # Metrics for the operation. By the time the operation is terminated (whether
5421
+ # succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are
5422
+ # finalized. AutoML BE transparently posts the metrics to Chemist if it's not
5423
+ # empty, regardless of the response content or error type. If user is supposed
5424
+ # to be charged in case of cancellation/error, this field should be set. In the
5425
+ # case where the type of LRO doesn't require any billing, this field should be
5426
+ # left unset.
5427
+ # Corresponds to the JSON property `reportingMetrics`
5428
+ # @return [Google::Apis::LanguageV1::XpsReportingMetrics]
5429
+ attr_accessor :reporting_metrics
5430
+
5431
+ #
5432
+ # Corresponds to the JSON property `tablesTrainingOperationMetadata`
5433
+ # @return [Google::Apis::LanguageV1::XpsTablesTrainingOperationMetadata]
5434
+ attr_accessor :tables_training_operation_metadata
5435
+
5436
+ #
5437
+ # Corresponds to the JSON property `videoBatchPredictOperationMetadata`
5438
+ # @return [Google::Apis::LanguageV1::XpsVideoBatchPredictOperationMetadata]
5439
+ attr_accessor :video_batch_predict_operation_metadata
5440
+
5441
+ #
5442
+ # Corresponds to the JSON property `videoTrainingOperationMetadata`
5443
+ # @return [Google::Apis::LanguageV1::XpsVideoTrainingOperationMetadata]
5444
+ attr_accessor :video_training_operation_metadata
5445
+
5446
+ #
5447
+ # Corresponds to the JSON property `visionTrainingOperationMetadata`
5448
+ # @return [Google::Apis::LanguageV1::XpsVisionTrainingOperationMetadata]
5449
+ attr_accessor :vision_training_operation_metadata
5450
+
5451
+ def initialize(**args)
5452
+ update!(**args)
5453
+ end
5454
+
5455
+ # Update properties of this object
5456
+ def update!(**args)
5457
+ @example_count = args[:example_count] if args.key?(:example_count)
5458
+ @reporting_metrics = args[:reporting_metrics] if args.key?(:reporting_metrics)
5459
+ @tables_training_operation_metadata = args[:tables_training_operation_metadata] if args.key?(:tables_training_operation_metadata)
5460
+ @video_batch_predict_operation_metadata = args[:video_batch_predict_operation_metadata] if args.key?(:video_batch_predict_operation_metadata)
5461
+ @video_training_operation_metadata = args[:video_training_operation_metadata] if args.key?(:video_training_operation_metadata)
5462
+ @vision_training_operation_metadata = args[:vision_training_operation_metadata] if args.key?(:vision_training_operation_metadata)
5463
+ end
5464
+ end
5465
+
5466
+ # An explanation method that redistributes Integrated Gradients attributions to
5467
+ # segmented regions, taking advantage of the model's fully differentiable
5468
+ # structure. Refer to this paper for more details: https://arxiv.org/abs/1906.
5469
+ # 02825 Only supports image Models (modality is IMAGE).
5470
+ class XpsXraiAttribution
5471
+ include Google::Apis::Core::Hashable
5472
+
5473
+ # The number of steps for approximating the path integral. A good value to start
5474
+ # is 50 and gradually increase until the sum to diff property is met within the
5475
+ # desired error range. Valid range of its value is [1, 100], inclusively.
5476
+ # Corresponds to the JSON property `stepCount`
5477
+ # @return [Fixnum]
5478
+ attr_accessor :step_count
5479
+
5480
+ def initialize(**args)
5481
+ update!(**args)
5482
+ end
5483
+
5484
+ # Update properties of this object
5485
+ def update!(**args)
5486
+ @step_count = args[:step_count] if args.key?(:step_count)
969
5487
  end
970
5488
  end
971
5489
  end