google-cloud-automl 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +11 -0
  3. data/AUTHENTICATION.md +199 -0
  4. data/LICENSE +201 -0
  5. data/README.md +69 -0
  6. data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +34 -0
  7. data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +18 -0
  8. data/lib/google/cloud/automl/v1beta1/automl_client.rb +1914 -0
  9. data/lib/google/cloud/automl/v1beta1/automl_client_config.json +146 -0
  10. data/lib/google/cloud/automl/v1beta1/classification_pb.rb +65 -0
  11. data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +28 -0
  12. data/lib/google/cloud/automl/v1beta1/credentials.rb +41 -0
  13. data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +48 -0
  14. data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +77 -0
  15. data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +36 -0
  16. data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +38 -0
  17. data/lib/google/cloud/automl/v1beta1/detection_pb.rb +52 -0
  18. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/annotation_payload.rb +63 -0
  19. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/annotation_spec.rb +41 -0
  20. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/classification.rb +203 -0
  21. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/column_spec.rb +72 -0
  22. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/data_items.rb +94 -0
  23. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/data_stats.rb +160 -0
  24. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/data_types.rb +107 -0
  25. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/dataset.rb +77 -0
  26. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/detection.rb +134 -0
  27. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/geometry.rb +43 -0
  28. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/image.rb +141 -0
  29. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/io.rb +975 -0
  30. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/model.rb +92 -0
  31. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/model_evaluation.rb +100 -0
  32. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/prediction_service.rb +136 -0
  33. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/ranges.rb +31 -0
  34. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/regression.rb +41 -0
  35. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/service.rb +368 -0
  36. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/table_spec.rb +64 -0
  37. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/tables.rb +261 -0
  38. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/temporal.rb +33 -0
  39. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/text.rb +53 -0
  40. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/text_extraction.rb +60 -0
  41. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/text_segment.rb +37 -0
  42. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/text_sentiment.rb +76 -0
  43. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/translation.rb +63 -0
  44. data/lib/google/cloud/automl/v1beta1/doc/google/cloud/automl/v1beta1/video.rb +35 -0
  45. data/lib/google/cloud/automl/v1beta1/doc/google/longrunning/operations.rb +51 -0
  46. data/lib/google/cloud/automl/v1beta1/doc/google/protobuf/any.rb +131 -0
  47. data/lib/google/cloud/automl/v1beta1/doc/google/protobuf/duration.rb +91 -0
  48. data/lib/google/cloud/automl/v1beta1/doc/google/protobuf/field_mask.rb +222 -0
  49. data/lib/google/cloud/automl/v1beta1/doc/google/protobuf/struct.rb +74 -0
  50. data/lib/google/cloud/automl/v1beta1/doc/google/protobuf/timestamp.rb +111 -0
  51. data/lib/google/cloud/automl/v1beta1/doc/google/rpc/status.rb +87 -0
  52. data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +21 -0
  53. data/lib/google/cloud/automl/v1beta1/image_pb.rb +43 -0
  54. data/lib/google/cloud/automl/v1beta1/io_pb.rb +80 -0
  55. data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +37 -0
  56. data/lib/google/cloud/automl/v1beta1/model_pb.rb +44 -0
  57. data/lib/google/cloud/automl/v1beta1/operations_pb.rb +90 -0
  58. data/lib/google/cloud/automl/v1beta1/prediction_service_client.rb +442 -0
  59. data/lib/google/cloud/automl/v1beta1/prediction_service_client_config.json +36 -0
  60. data/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +39 -0
  61. data/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb +72 -0
  62. data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +17 -0
  63. data/lib/google/cloud/automl/v1beta1/regression_pb.rb +20 -0
  64. data/lib/google/cloud/automl/v1beta1/service_pb.rb +177 -0
  65. data/lib/google/cloud/automl/v1beta1/service_services_pb.rb +159 -0
  66. data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +22 -0
  67. data/lib/google/cloud/automl/v1beta1/tables_pb.rb +56 -0
  68. data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +18 -0
  69. data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +32 -0
  70. data/lib/google/cloud/automl/v1beta1/text_pb.rb +33 -0
  71. data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +18 -0
  72. data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +29 -0
  73. data/lib/google/cloud/automl/v1beta1/translation_pb.rb +33 -0
  74. data/lib/google/cloud/automl/v1beta1/video_pb.rb +25 -0
  75. data/lib/google/cloud/automl/v1beta1.rb +231 -0
  76. data/lib/google/cloud/automl/version.rb +22 -0
  77. data/lib/google/cloud/automl.rb +219 -0
  78. data/lib/google-cloud-automl.rb +15 -0
  79. metadata +203 -0
@@ -0,0 +1,203 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module AutoML
19
+ module V1beta1
20
+ # Contains annotation details specific to classification.
21
+ # @!attribute [rw] score
22
+ # @return [Float]
23
+ # Output only. A confidence estimate between 0.0 and 1.0. A higher value
24
+ # means greater confidence that the annotation is positive. If a user
25
+ # approves an annotation as negative or positive, the score value remains
26
+ # unchanged. If a user creates an annotation, the score is 0 for negative or
27
+ # 1 for positive.
28
+ class ClassificationAnnotation; end
29
+
30
+ # Contains annotation details specific to video classification.
31
+ # @!attribute [rw] type
32
+ # @return [String]
33
+ # Output only. Expresses the type of video classification. Possible values:
34
+ #
35
+ # * `segment` - Classification done on a specified by user
36
+ # time segment of a video. AnnotationSpec is answered to be present
37
+ # in that time segment, if it is present in any part of it. The video
38
+ # ML model evaluations are done only for this type of classification.
39
+ #
40
+ # * `shot`- Shot-level classification.
41
+ # AutoML Video Intelligence determines the boundaries
42
+ # for each camera shot in the entire segment of the video that user
43
+ # specified in the request configuration. AutoML Video Intelligence
44
+ # then returns labels and their confidence scores for each detected
45
+ # shot, along with the start and end time of the shot.
46
+ # WARNING: Model evaluation is not done for this classification type,
47
+ # the quality of it depends on training data, but there are no
48
+ # metrics provided to describe that quality.
49
+ #
50
+ # * `1s_interval` - AutoML Video Intelligence returns labels and their
51
+ # confidence scores for each second of the entire segment of the video
52
+ # that user specified in the request configuration.
53
+ # WARNING: Model evaluation is not done for this classification type,
54
+ # the quality of it depends on training data, but there are no
55
+ # metrics provided to describe that quality.
56
+ # @!attribute [rw] classification_annotation
57
+ # @return [Google::Cloud::AutoML::V1beta1::ClassificationAnnotation]
58
+ # Output only . The classification details of this annotation.
59
+ # @!attribute [rw] time_segment
60
+ # @return [Google::Cloud::AutoML::V1beta1::TimeSegment]
61
+ # Output only . The time segment of the video to which the
62
+ # annotation applies.
63
+ class VideoClassificationAnnotation; end
64
+
65
+ # Model evaluation metrics for classification problems.
66
+ # Note: For Video Classification this metrics only describe quality of the
67
+ # Video Classification predictions of "segment_classification" type.
68
+ # @!attribute [rw] au_prc
69
+ # @return [Float]
70
+ # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
71
+ # for the overall evaluation.
72
+ # @!attribute [rw] base_au_prc
73
+ # @return [Float]
74
+ # Output only. The Area Under Precision-Recall Curve metric based on priors.
75
+ # Micro-averaged for the overall evaluation.
76
+ # Deprecated.
77
+ # @!attribute [rw] au_roc
78
+ # @return [Float]
79
+ # Output only. The Area Under Receiver Operating Characteristic curve metric.
80
+ # Micro-averaged for the overall evaluation.
81
+ # @!attribute [rw] log_loss
82
+ # @return [Float]
83
+ # Output only. The Log Loss metric.
84
+ # @!attribute [rw] confidence_metrics_entry
85
+ # @return [Array<Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>]
86
+ # Output only. Metrics for each confidence_threshold in
87
+ # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
88
+ # position_threshold = INT32_MAX_VALUE.
89
+ # ROC and precision-recall curves, and other aggregated metrics are derived
90
+ # from them. The confidence metrics entries may also be supplied for
91
+ # additional values of position_threshold, but from these no aggregated
92
+ # metrics are computed.
93
+ # @!attribute [rw] confusion_matrix
94
+ # @return [Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix]
95
+ # Output only. Confusion matrix of the evaluation.
96
+ # Only set for MULTICLASS classification problems where number
97
+ # of labels is no more than 10.
98
+ # Only set for model level evaluation, not for evaluation per label.
99
+ # @!attribute [rw] annotation_spec_id
100
+ # @return [Array<String>]
101
+ # Output only. The annotation spec ids used for this evaluation.
102
+ class ClassificationEvaluationMetrics
103
+ # Metrics for a single confidence threshold.
104
+ # @!attribute [rw] confidence_threshold
105
+ # @return [Float]
106
+ # Output only. Metrics are computed with an assumption that the model
107
+ # never returns predictions with score lower than this value.
108
+ # @!attribute [rw] position_threshold
109
+ # @return [Integer]
110
+ # Output only. Metrics are computed with an assumption that the model
111
+ # always returns at most this many predictions (ordered by their score,
112
+ # descendingly), but they all still need to meet the confidence_threshold.
113
+ # @!attribute [rw] recall
114
+ # @return [Float]
115
+ # Output only. Recall (True Positive Rate) for the given confidence
116
+ # threshold.
117
+ # @!attribute [rw] precision
118
+ # @return [Float]
119
+ # Output only. Precision for the given confidence threshold.
120
+ # @!attribute [rw] false_positive_rate
121
+ # @return [Float]
122
+ # Output only. False Positive Rate for the given confidence threshold.
123
+ # @!attribute [rw] f1_score
124
+ # @return [Float]
125
+ # Output only. The harmonic mean of recall and precision.
126
+ # @!attribute [rw] recall_at1
127
+ # @return [Float]
128
+ # Output only. The Recall (True Positive Rate) when only considering the
129
+ # label that has the highest prediction score and not below the confidence
130
+ # threshold for each example.
131
+ # @!attribute [rw] precision_at1
132
+ # @return [Float]
133
+ # Output only. The precision when only considering the label that has the
134
+ # highest prediction score and not below the confidence threshold for each
135
+ # example.
136
+ # @!attribute [rw] false_positive_rate_at1
137
+ # @return [Float]
138
+ # Output only. The False Positive Rate when only considering the label that
139
+ # has the highest prediction score and not below the confidence threshold
140
+ # for each example.
141
+ # @!attribute [rw] f1_score_at1
142
+ # @return [Float]
143
+ # Output only. The harmonic mean of {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}.
144
+ # @!attribute [rw] true_positive_count
145
+ # @return [Integer]
146
+ # Output only. The number of model created labels that match a ground truth
147
+ # label.
148
+ # @!attribute [rw] false_positive_count
149
+ # @return [Integer]
150
+ # Output only. The number of model created labels that do not match a
151
+ # ground truth label.
152
+ # @!attribute [rw] false_negative_count
153
+ # @return [Integer]
154
+ # Output only. The number of ground truth labels that are not matched
155
+ # by a model created label.
156
+ # @!attribute [rw] true_negative_count
157
+ # @return [Integer]
158
+ # Output only. The number of labels that were not created by the model,
159
+ # but if they would, they would not match a ground truth label.
160
+ class ConfidenceMetricsEntry; end
161
+
162
+ # Confusion matrix of the model running the classification.
163
+ # @!attribute [rw] annotation_spec_id
164
+ # @return [Array<String>]
165
+ # Output only. IDs of the annotation specs used in the confusion matrix.
166
+ # For Tables CLASSIFICATION
167
+ #
168
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#prediction_type prediction_type}
169
+ # only list of {Annotation_spec_display_name-s} is populated.
170
+ # @!attribute [rw] row
171
+ # @return [Array<Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>]
172
+ # Output only. Rows in the confusion matrix. The number of rows is equal to
173
+ # the size of `annotation_spec_id`.
174
+ # `row[i].value[j]` is the number of examples that have ground truth of the
175
+ # `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
176
+ # the model being evaluated.
177
+ class ConfusionMatrix
178
+ # Output only. A row in the confusion matrix.
179
+ # @!attribute [rw] example_count
180
+ # @return [Array<Integer>]
181
+ # Output only. Value of the specific cell in the confusion matrix.
182
+ # The number of values each row has (i.e. the length of the row) is equal
183
+ # to the length of the `annotation_spec_id` field or, if that one is not
184
+ # populated, length of the {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field.
185
+ class Row; end
186
+ end
187
+ end
188
+
189
+ # Type of the classification problem.
190
+ module ClassificationType
191
+ # An un-set value of this enum.
192
+ CLASSIFICATION_TYPE_UNSPECIFIED = 0
193
+
194
+ # At most one label is allowed per example.
195
+ MULTICLASS = 1
196
+
197
+ # Multiple labels are allowed for one example.
198
+ MULTILABEL = 2
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,72 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module AutoML
19
+ module V1beta1
20
+ # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were
21
+ # given on import .
22
+ # Used by:
23
+ # * Tables
24
+ # @!attribute [rw] name
25
+ # @return [String]
26
+ # Output only. The resource name of the column specs.
27
+ # Form:
28
+ #
29
+ # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
30
+ # @!attribute [rw] data_type
31
+ # @return [Google::Cloud::AutoML::V1beta1::DataType]
32
+ # The data type of elements stored in the column.
33
+ # @!attribute [rw] display_name
34
+ # @return [String]
35
+ # Output only. The name of the column to show in the interface. The name can
36
+ # be up to 100 characters long and can consist only of ASCII Latin letters
37
+ # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
38
+ # must start with a letter or a digit.
39
+ # @!attribute [rw] data_stats
40
+ # @return [Google::Cloud::AutoML::V1beta1::DataStats]
41
+ # Output only. Stats of the series of values in the column.
42
+ # This field may be stale, see the ancestor's
43
+ # Dataset.tables_dataset_metadata.stats_update_time field
44
+ # for the timestamp at which these stats were last updated.
45
+ # @!attribute [rw] top_correlated_columns
46
+ # @return [Array<Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>]
47
+ # Output only. Top 10 most correlated with this column columns of the table,
48
+ # ordered by
49
+ # {Google::Cloud::AutoML::V1beta1::CorrelationStats#cramers_v cramers_v} metric.
50
+ # This field may be stale, see the ancestor's
51
+ # Dataset.tables_dataset_metadata.stats_update_time field
52
+ # for the timestamp at which these stats were last updated.
53
+ # @!attribute [rw] etag
54
+ # @return [String]
55
+ # Used to perform consistent read-modify-write updates. If not set, a blind
56
+ # "overwrite" update happens.
57
+ class ColumnSpec
58
+ # Identifies the table's column, and its correlation with the column this
59
+ # ColumnSpec describes.
60
+ # @!attribute [rw] column_spec_id
61
+ # @return [String]
62
+ # The column_spec_id of the correlated column, which belongs to the same
63
+ # table as the in-context column.
64
+ # @!attribute [rw] correlation_stats
65
+ # @return [Google::Cloud::AutoML::V1beta1::CorrelationStats]
66
+ # Correlation between this and the in-context column.
67
+ class CorrelatedColumn; end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,94 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module AutoML
19
+ module V1beta1
20
+ # A representation of an image.
21
+ # Only images up to 30MB in size are supported.
22
+ # @!attribute [rw] image_bytes
23
+ # @return [String]
24
+ # Image content represented as a stream of bytes.
25
+ # Note: As with all `bytes` fields, protobuffers use a pure binary
26
+ # representation, whereas JSON representations use base64.
27
+ # @!attribute [rw] input_config
28
+ # @return [Google::Cloud::AutoML::V1beta1::InputConfig]
29
+ # An input config specifying the content of the image.
30
+ # @!attribute [rw] thumbnail_uri
31
+ # @return [String]
32
+ # Output only. HTTP URI to the thumbnail image.
33
+ class Image; end
34
+
35
+ # A representation of a text snippet.
36
+ # @!attribute [rw] content
37
+ # @return [String]
38
+ # Required. The content of the text snippet as a string. Up to 250000
39
+ # characters long.
40
+ # @!attribute [rw] mime_type
41
+ # @return [String]
42
+ # The format of the source text. Currently the only two allowed values are
43
+ # "text/html" and "text/plain". If left blank the format is automatically
44
+ # determined from the type of the uploaded content.
45
+ # @!attribute [rw] content_uri
46
+ # @return [String]
47
+ # Output only. HTTP URI where you can download the content.
48
+ class TextSnippet; end
49
+
50
+ # A structured text document e.g. a PDF.
51
+ # @!attribute [rw] input_config
52
+ # @return [Google::Cloud::AutoML::V1beta1::DocumentInputConfig]
53
+ # An input config specifying the content of the document.
54
+ class Document; end
55
+
56
+ # A representation of a row in a relational table.
57
+ # @!attribute [rw] column_spec_ids
58
+ # @return [Array<String>]
59
+ # Input Only.
60
+ # The resource IDs of the column specs describing the columns of the row.
61
+ # If set must contain, but possibly in a different order, all input feature
62
+ #
63
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids}
64
+ # of the Model this row is being passed to.
65
+ # Note: The below `values` field must match order of this field, if this
66
+ # field is set.
67
+ # @!attribute [rw] values
68
+ # @return [Array<Google::Protobuf::Value>]
69
+ # Input Only.
70
+ # The values of the row cells, given in the same order as the
71
+ # column_spec_ids, or, if not set, then in the same order as input feature
72
+ #
73
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs}
74
+ # of the Model this row is being passed to.
75
+ class Row; end
76
+
77
+ # Example data used for training or prediction.
78
+ # @!attribute [rw] image
79
+ # @return [Google::Cloud::AutoML::V1beta1::Image]
80
+ # Example image.
81
+ # @!attribute [rw] text_snippet
82
+ # @return [Google::Cloud::AutoML::V1beta1::TextSnippet]
83
+ # Example text.
84
+ # @!attribute [rw] document
85
+ # @return [Google::Cloud::AutoML::V1beta1::Document]
86
+ # Example document.
87
+ # @!attribute [rw] row
88
+ # @return [Google::Cloud::AutoML::V1beta1::Row]
89
+ # Example relational table row.
90
+ class ExamplePayload; end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,160 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module AutoML
19
+ module V1beta1
20
+ # The data statistics of a series of values that share the same DataType.
21
+ # @!attribute [rw] float64_stats
22
+ # @return [Google::Cloud::AutoML::V1beta1::Float64Stats]
23
+ # The statistics for FLOAT64 DataType.
24
+ # @!attribute [rw] string_stats
25
+ # @return [Google::Cloud::AutoML::V1beta1::StringStats]
26
+ # The statistics for STRING DataType.
27
+ # @!attribute [rw] timestamp_stats
28
+ # @return [Google::Cloud::AutoML::V1beta1::TimestampStats]
29
+ # The statistics for TIMESTAMP DataType.
30
+ # @!attribute [rw] array_stats
31
+ # @return [Google::Cloud::AutoML::V1beta1::ArrayStats]
32
+ # The statistics for ARRAY DataType.
33
+ # @!attribute [rw] struct_stats
34
+ # @return [Google::Cloud::AutoML::V1beta1::StructStats]
35
+ # The statistics for STRUCT DataType.
36
+ # @!attribute [rw] category_stats
37
+ # @return [Google::Cloud::AutoML::V1beta1::CategoryStats]
38
+ # The statistics for CATEGORY DataType.
39
+ # @!attribute [rw] distinct_value_count
40
+ # @return [Integer]
41
+ # The number of distinct values.
42
+ # @!attribute [rw] null_value_count
43
+ # @return [Integer]
44
+ # The number of values that are null.
45
+ # @!attribute [rw] valid_value_count
46
+ # @return [Integer]
47
+ # The number of values that are valid.
48
+ class DataStats; end
49
+
50
+ # The data statistics of a series of FLOAT64 values.
51
+ # @!attribute [rw] mean
52
+ # @return [Float]
53
+ # The mean of the series.
54
+ # @!attribute [rw] standard_deviation
55
+ # @return [Float]
56
+ # The standard deviation of the series.
57
+ # @!attribute [rw] quantiles
58
+ # @return [Array<Float>]
59
+ # Ordered from 0 to k k-quantile values of the data series of n values.
60
+ # The value at index i is, approximately, the i*n/k-th smallest value in the
61
+ # series; for i = 0 and i = k these are, respectively, the min and max
62
+ # values.
63
+ # @!attribute [rw] histogram_buckets
64
+ # @return [Array<Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>]
65
+ # Histogram buckets of the data series. Sorted by the min value of the
66
+ # bucket, ascendingly, and the number of the buckets is dynamically
67
+ # generated. The buckets are non-overlapping and completely cover whole
68
+ # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
69
+ # the last one being `"Infinity"`.
70
+ class Float64Stats
71
+ # A bucket of a histogram.
72
+ # @!attribute [rw] min
73
+ # @return [Float]
74
+ # The minimum value of the bucket, inclusive.
75
+ # @!attribute [rw] max
76
+ # @return [Float]
77
+ # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
78
+ # which case it's inclusive.
79
+ # @!attribute [rw] count
80
+ # @return [Integer]
81
+ # The number of data values that are in the bucket, i.e. are between
82
+ # min and max values.
83
+ class HistogramBucket; end
84
+ end
85
+
86
+ # The data statistics of a series of STRING values.
87
+ # @!attribute [rw] top_unigram_stats
88
+ # @return [Array<Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>]
89
+ # The statistics of the top 20 unigrams, ordered by
90
+ # {Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}.
91
+ class StringStats
92
+ # The statistics of a unigram.
93
+ # @!attribute [rw] value
94
+ # @return [String]
95
+ # The unigram.
96
+ # @!attribute [rw] count
97
+ # @return [Integer]
98
+ # The number of occurrences of this unigram in the series.
99
+ class UnigramStats; end
100
+ end
101
+
102
+ # The data statistics of a series of TIMESTAMP values.
103
+ # @!attribute [rw] granular_stats
104
+ # @return [Hash{String => Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}]
105
+ # The string key is the pre-defined granularity. Currently supported:
106
+ # hour_of_day, day_of_week, month_of_year.
107
+ # Granularities finer that the granularity of timestamp data are not
108
+ # populated (e.g. if timestamps are at day granularity, then hour_of_day
109
+ # is not populated).
110
+ class TimestampStats
111
+ # Stats split by a defined in context granularity.
112
+ # @!attribute [rw] buckets
113
+ # @return [Hash{Integer => Integer}]
114
+ # A map from granularity key to example count for that key.
115
+ # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
116
+ class GranularStats; end
117
+ end
118
+
119
+ # The data statistics of a series of ARRAY values.
120
+ # @!attribute [rw] member_stats
121
+ # @return [Google::Cloud::AutoML::V1beta1::DataStats]
122
+ # Stats of all the values of all arrays, as if they were a single long
123
+ # series of data. The type depends on the element type of the array.
124
+ class ArrayStats; end
125
+
126
+ # The data statistics of a series of STRUCT values.
127
+ # @!attribute [rw] field_stats
128
+ # @return [Hash{String => Google::Cloud::AutoML::V1beta1::DataStats}]
129
+ # Map from a field name of the struct to data stats aggregated over series
130
+ # of all data in that field across all the structs.
131
+ class StructStats; end
132
+
133
+ # The data statistics of a series of CATEGORY values.
134
+ # @!attribute [rw] top_category_stats
135
+ # @return [Array<Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>]
136
+ # The statistics of the top 20 CATEGORY values, ordered by
137
+ #
138
+ # {Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}.
139
+ class CategoryStats
140
+ # The statistics of a single CATEGORY value.
141
+ # @!attribute [rw] value
142
+ # @return [String]
143
+ # The CATEGORY value.
144
+ # @!attribute [rw] count
145
+ # @return [Integer]
146
+ # The number of occurrences of this value in the series.
147
+ class SingleCategoryStats; end
148
+ end
149
+
150
+ # A correlation statistics between two series of DataType values. The series
151
+ # may have differing DataType-s, but within a single series the DataType must
152
+ # be the same.
153
+ # @!attribute [rw] cramers_v
154
+ # @return [Float]
155
+ # The correlation value using the Cramer's V measure.
156
+ class CorrelationStats; end
157
+ end
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,107 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module AutoML
19
+ module V1beta1
20
+ # Indicated the type of data that can be stored in a structured data entity
21
+ # (e.g. a table).
22
+ # @!attribute [rw] list_element_type
23
+ # @return [Google::Cloud::AutoML::V1beta1::DataType]
24
+ # If {Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY},
25
+ # then `list_element_type` is the type of the elements.
26
+ # @!attribute [rw] struct_type
27
+ # @return [Google::Cloud::AutoML::V1beta1::StructType]
28
+ # If {Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type`
29
+ # provides type information for the struct's fields.
30
+ # @!attribute [rw] time_format
31
+ # @return [String]
32
+ # If {Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP}
33
+ # then `time_format` provides the format in which that time field is
34
+ # expressed. The time_format must either be one of:
35
+ # * `UNIX_SECONDS`
36
+ # * `UNIX_MILLISECONDS`
37
+ # * `UNIX_MICROSECONDS`
38
+ # * `UNIX_NANOSECONDS`
39
+ # (for respectively number of seconds, milliseconds, microseconds and
40
+ # nanoseconds since start of the Unix epoch);
41
+ # or be written in `strftime` syntax. If time_format is not set, then the
42
+ # default format as described on the type_code is used.
43
+ # @!attribute [rw] type_code
44
+ # @return [Google::Cloud::AutoML::V1beta1::TypeCode]
45
+ # Required. The {Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type.
46
+ # @!attribute [rw] nullable
47
+ # @return [true, false]
48
+ # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
49
+ # expressed as an empty string.
50
+ class DataType; end
51
+
52
+ # `StructType` defines the DataType-s of a {Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type.
53
+ # @!attribute [rw] fields
54
+ # @return [Hash{String => Google::Cloud::AutoML::V1beta1::DataType}]
55
+ # Unordered map of struct field names to their data types.
56
+ # Fields cannot be added or removed via Update. Their names and
57
+ # data types are still mutable.
58
+ class StructType; end
59
+
60
+ # `TypeCode` is used as a part of
61
+ # {Google::Cloud::AutoML::V1beta1::DataType DataType}.
62
+ #
63
+ # Each legal value of a DataType can be encoded to or decoded from a JSON
64
+ # value, using the encodings listed below, and definitions of which can be
65
+ # found at
66
+ #
67
+ # https:
68
+ # //developers.google.com/protocol-buffers
69
+ # // /docs/reference/google.protobuf#value.
70
+ module TypeCode
71
+ # Not specified. Should not be used.
72
+ TYPE_CODE_UNSPECIFIED = 0
73
+
74
+ # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
75
+ # `"-Infinity"`.
76
+ FLOAT64 = 3
77
+
78
+ # Must be between 0AD and 9999AD. Encoded as `string` according to
79
+ # {Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if
80
+ # that format is not set, then in RFC 3339 `date-time` format, where
81
+ # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z).
82
+ TIMESTAMP = 4
83
+
84
+ # Encoded as `string`.
85
+ STRING = 6
86
+
87
+ # Encoded as `list`, where the list elements are represented according to
88
+ #
89
+ # {Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}.
90
+ ARRAY = 8
91
+
92
+ # Encoded as `struct`, where field values are represented according to
93
+ # {Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}.
94
+ STRUCT = 9
95
+
96
+ # Values of this type are not further understood by AutoML,
97
+ # e.g. AutoML is unable to tell the order of values (as it could with
98
+ # FLOAT64), or is unable to say if one value contains another (as it
99
+ # could with STRING).
100
+ # Encoded as `string` (bytes should be base64-encoded, as described in RFC
101
+ # 4648, section 4).
102
+ CATEGORY = 10
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end