google-apis-language_v1beta2 0.20.0 → 0.22.0

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