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,261 @@
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
+ # Metadata for a dataset used for AutoML Tables.
21
+ # @!attribute [rw] primary_table_spec_id
22
+ # @return [String]
23
+ # Output only. The table_spec_id of the primary table of this dataset.
24
+ # @!attribute [rw] target_column_spec_id
25
+ # @return [String]
26
+ # column_spec_id of the primary table's column that should be used as the
27
+ # training & prediction target.
28
+ # This column must be non-nullable and have one of following data types
29
+ # (otherwise model creation will error):
30
+ # * CATEGORY
31
+ # * FLOAT64
32
+ # Furthermore, if the type is CATEGORY , then only up to
33
+ # 100 unique values may exist in that column across all rows.
34
+ #
35
+ # NOTE: Updates of this field will instantly affect any other users
36
+ # concurrently working with the dataset.
37
+ # @!attribute [rw] weight_column_spec_id
38
+ # @return [String]
39
+ # column_spec_id of the primary table's column that should be used as the
40
+ # weight column, i.e. the higher the value the more important the row will be
41
+ # during model training.
42
+ # Required type: FLOAT64.
43
+ # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
44
+ # ignored for training.
45
+ # If not set all rows are assumed to have equal weight of 1.
46
+ # NOTE: Updates of this field will instantly affect any other users
47
+ # concurrently working with the dataset.
48
+ # @!attribute [rw] ml_use_column_spec_id
49
+ # @return [String]
50
+ # column_spec_id of the primary table column which specifies a possible ML
51
+ # use of the row, i.e. the column will be used to split the rows into TRAIN,
52
+ # VALIDATE and TEST sets.
53
+ # Required type: STRING.
54
+ # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
55
+ # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
56
+ # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
57
+ # that if a given ml use distribution makes it impossible to create a "good"
58
+ # model, that call will error describing the issue.
59
+ # If both this column_spec_id and primary table's time_column_spec_id are not
60
+ # set, then all rows are treated as `UNASSIGNED`.
61
+ # NOTE: Updates of this field will instantly affect any other users
62
+ # concurrently working with the dataset.
63
+ # @!attribute [rw] target_column_correlations
64
+ # @return [Hash{String => Google::Cloud::AutoML::V1beta1::CorrelationStats}]
65
+ # Output only. Correlations between
66
+ #
67
+ # {Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata#target_column_spec_id},
68
+ # and other columns of the
69
+ #
70
+ # {Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}.
71
+ # Only set if the target column is set. Mapping from other column spec id to
72
+ # its CorrelationStats with the target column.
73
+ # This field may be stale, see the stats_update_time field for
74
+ # for the timestamp at which these stats were last updated.
75
+ # @!attribute [rw] stats_update_time
76
+ # @return [Google::Protobuf::Timestamp]
77
+ # The most recent timestamp when target_column_correlations field and all
78
+ # descendant ColumnSpec.data_stats and ColumnSpec.top_correlated_columns
79
+ # fields were last (re-)generated. Any changes that happened to the dataset
80
+ # afterwards are not reflected in these fields values. The regeneration
81
+ # happens in the background on a best effort basis.
82
+ class TablesDatasetMetadata; end
83
+
84
+ # Model metadata specific to AutoML Tables.
85
+ # @!attribute [rw] target_column_spec
86
+ # @return [Google::Cloud::AutoML::V1beta1::ColumnSpec]
87
+ # Column spec of the dataset's primary table's column the model is
88
+ # predicting. Snapshotted when model creation started.
89
+ # Only 3 fields are used:
90
+ # name - May be set on CreateModel, if it's not then the ColumnSpec
91
+ # corresponding to the current target_column_spec_id of the dataset
92
+ # the model is trained from is used.
93
+ # If neither is set, CreateModel will error.
94
+ # display_name - Output only.
95
+ # data_type - Output only.
96
+ # @!attribute [rw] input_feature_column_specs
97
+ # @return [Array<Google::Cloud::AutoML::V1beta1::ColumnSpec>]
98
+ # Column specs of the dataset's primary table's columns, on which
99
+ # the model is trained and which are used as the input for predictions.
100
+ # The
101
+ #
102
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}
103
+ # as well as, according to dataset's state upon model creation,
104
+ #
105
+ # {Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column},
106
+ # and
107
+ #
108
+ # {Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column}
109
+ # must never be included here.
110
+ # Only 3 fields are used:
111
+ # name - May be set on CreateModel, if set only the columns specified are
112
+ # used, otherwise all primary table's columns (except the ones listed
113
+ # above) are used for the training and prediction input.
114
+ # display_name - Output only.
115
+ # data_type - Output only.
116
+ # @!attribute [rw] optimization_objective
117
+ # @return [String]
118
+ # Objective function the model is optimizing towards. The training process
119
+ # creates a model that maximizes/minimizes the value of the objective
120
+ # function over the validation set.
121
+ #
122
+ # The supported optimization objectives depend on the prediction type.
123
+ # If the field is not set, a default objective function is used.
124
+ #
125
+ # CLASSIFICATION_BINARY:
126
+ # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver
127
+ # operating characteristic (ROC) curve.
128
+ # "MINIMIZE_LOG_LOSS" - Minimize log loss.
129
+ # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve.
130
+ # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified
131
+ # recall value.
132
+ # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified
133
+ # precision value.
134
+ #
135
+ # CLASSIFICATION_MULTI_CLASS :
136
+ # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss.
137
+ #
138
+ #
139
+ # REGRESSION:
140
+ # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE).
141
+ # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE).
142
+ # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE).
143
+ #
144
+ # FORECASTING:
145
+ # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE).
146
+ # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE).
147
+ # @!attribute [rw] optimization_objective_recall_value
148
+ # @return [Float]
149
+ # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL".
150
+ # Must be between 0 and 1, inclusive.
151
+ # @!attribute [rw] optimization_objective_precision_value
152
+ # @return [Float]
153
+ # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION".
154
+ # Must be between 0 and 1, inclusive.
155
+ # @!attribute [rw] tables_model_column_info
156
+ # @return [Array<Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>]
157
+ # Output only. Auxiliary information for each of the
158
+ # input_feature_column_specs with respect to this particular model.
159
+ # @!attribute [rw] train_budget_milli_node_hours
160
+ # @return [Integer]
161
+ # Required. The train budget of creating this model, expressed in milli node
162
+ # hours i.e. 1,000 value in this field means 1 node hour.
163
+ #
164
+ # The training cost of the model will not exceed this budget. The final cost
165
+ # will be attempted to be close to the budget, though may end up being (even)
166
+ # noticeably smaller - at the backend's discretion. This especially may
167
+ # happen when further model training ceases to provide any improvements.
168
+ #
169
+ # If the budget is set to a value known to be insufficient to train a
170
+ # model for the given dataset, the training won't be attempted and
171
+ # will error.
172
+ #
173
+ # The train budget must be between 1,000 and 72,000 milli node hours,
174
+ # inclusive.
175
+ # @!attribute [rw] train_cost_milli_node_hours
176
+ # @return [Integer]
177
+ # Output only. The actual training cost of the model, expressed in milli
178
+ # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
179
+ # to not exceed the train budget.
180
+ # @!attribute [rw] disable_early_stopping
181
+ # @return [true, false]
182
+ # Use the entire training budget. This disables the early stopping feature.
183
+ # By default, the early stopping feature is enabled, which means that AutoML
184
+ # Tables might stop training before the entire training budget has been used.
185
+ class TablesModelMetadata; end
186
+
187
+ # Contains annotation details specific to Tables.
188
+ # @!attribute [rw] score
189
+ # @return [Float]
190
+ # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
191
+ # value means greater confidence in the returned value.
192
+ # For
193
+ #
194
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec}
195
+ # of FLOAT64 data type the score is not populated.
196
+ # @!attribute [rw] prediction_interval
197
+ # @return [Google::Cloud::AutoML::V1beta1::DoubleRange]
198
+ # Output only. Only populated when
199
+ #
200
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec}
201
+ # has FLOAT64 data type. An interval in which the exactly correct target
202
+ # value has 95% chance to be in.
203
+ # @!attribute [rw] value
204
+ # @return [Google::Protobuf::Value]
205
+ # The predicted value of the row's
206
+ #
207
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}.
208
+ # The value depends on the column's DataType:
209
+ # CATEGORY - the predicted (with the above confidence `score`) CATEGORY
210
+ # value.
211
+ # FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
212
+ # @!attribute [rw] tables_model_column_info
213
+ # @return [Array<Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>]
214
+ # Output only. Auxiliary information for each of the model's
215
+ #
216
+ # {Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs}
217
+ # with respect to this particular prediction.
218
+ # If no other fields than
219
+ #
220
+ # {Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name}
221
+ # and
222
+ #
223
+ # {Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name}
224
+ # would be populated, then this whole field is not.
225
+ class TablesAnnotation; end
226
+
227
+ # An information specific to given column and Tables Model, in context
228
+ # of the Model and the predictions created by it.
229
+ # @!attribute [rw] column_spec_name
230
+ # @return [String]
231
+ # Output only. The name of the ColumnSpec describing the column. Not
232
+ # populated when this proto is outputted to BigQuery.
233
+ # @!attribute [rw] column_display_name
234
+ # @return [String]
235
+ # Output only. The display name of the column (same as the display_name of
236
+ # its ColumnSpec).
237
+ # @!attribute [rw] feature_importance
238
+ # @return [Float]
239
+ # Output only.
240
+ #
241
+ # When given as part of a Model (always populated):
242
+ # Measurement of how much model predictions correctness on the TEST data
243
+ # depend on values in this column. A value between 0 and 1, higher means
244
+ # higher influence. These values are normalized - for all input feature
245
+ # columns of a given model they add to 1.
246
+ #
247
+ # When given back by Predict (populated iff
248
+ # [feature_importance
249
+ # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
250
+ # Predict (populated iff
251
+ # {Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance}
252
+ # param is set):
253
+ # Measurement of how impactful for the prediction returned for the given row
254
+ # the value in this column was. A value between 0 and 1, higher means larger
255
+ # impact. These values are normalized - for all input feature columns of a
256
+ # single predicted row they add to 1.
257
+ class TablesModelColumnInfo; end
258
+ end
259
+ end
260
+ end
261
+ end
@@ -0,0 +1,33 @@
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 time period inside of an example that has a time dimension (e.g. video).
21
+ # @!attribute [rw] start_time_offset
22
+ # @return [Google::Protobuf::Duration]
23
+ # Start of the time segment (inclusive), represented as the duration since
24
+ # the example start.
25
+ # @!attribute [rw] end_time_offset
26
+ # @return [Google::Protobuf::Duration]
27
+ # End of the time segment (exclusive), represented as the duration since the
28
+ # example start.
29
+ class TimeSegment; end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,53 @@
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
+ # Dataset metadata for classification.
21
+ # @!attribute [rw] classification_type
22
+ # @return [Google::Cloud::AutoML::V1beta1::ClassificationType]
23
+ # Required.
24
+ # Type of the classification problem.
25
+ class TextClassificationDatasetMetadata; end
26
+
27
+ # Model metadata that is specific to text classification.
28
+ class TextClassificationModelMetadata; end
29
+
30
+ # Dataset metadata that is specific to text extraction
31
+ class TextExtractionDatasetMetadata; end
32
+
33
+ # Model metadata that is specific to text extraction.
34
+ class TextExtractionModelMetadata; end
35
+
36
+ # Dataset metadata for text sentiment.
37
+ # @!attribute [rw] sentiment_max
38
+ # @return [Integer]
39
+ # Required.
40
+ # A sentiment is expressed as an integer ordinal, where higher value
41
+ # means a more positive sentiment. The range of sentiments that will be used
42
+ # is between 0 and sentiment_max (inclusive on both ends), and all the values
43
+ # in the range must be represented in the dataset before a model can be
44
+ # created.
45
+ # sentiment_max value must be between 1 and 10 (inclusive).
46
+ class TextSentimentDatasetMetadata; end
47
+
48
+ # Model metadata that is specific to text sentiment.
49
+ class TextSentimentModelMetadata; end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,60 @@
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
+ # Annotation for identifying spans of text.
21
+ # @!attribute [rw] text_segment
22
+ # @return [Google::Cloud::AutoML::V1beta1::TextSegment]
23
+ # An entity annotation will set this, which is the part of the original
24
+ # text to which the annotation pertains.
25
+ # @!attribute [rw] score
26
+ # @return [Float]
27
+ # Output only. A confidence estimate between 0.0 and 1.0. A higher value
28
+ # means greater confidence in correctness of the annotation.
29
+ class TextExtractionAnnotation; end
30
+
31
+ # Model evaluation metrics for text extraction problems.
32
+ # @!attribute [rw] au_prc
33
+ # @return [Float]
34
+ # Output only. The Area under precision recall curve metric.
35
+ # @!attribute [rw] confidence_metrics_entries
36
+ # @return [Array<Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>]
37
+ # Output only. Metrics that have confidence thresholds.
38
+ # Precision-recall curve can be derived from it.
39
+ class TextExtractionEvaluationMetrics
40
+ # Metrics for a single confidence threshold.
41
+ # @!attribute [rw] confidence_threshold
42
+ # @return [Float]
43
+ # Output only. The confidence threshold value used to compute the metrics.
44
+ # Only annotations with score of at least this threshold are considered to
45
+ # be ones the model would return.
46
+ # @!attribute [rw] recall
47
+ # @return [Float]
48
+ # Output only. Recall under the given confidence threshold.
49
+ # @!attribute [rw] precision
50
+ # @return [Float]
51
+ # Output only. Precision under the given confidence threshold.
52
+ # @!attribute [rw] f1_score
53
+ # @return [Float]
54
+ # Output only. The harmonic mean of recall and precision.
55
+ class ConfidenceMetricsEntry; end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,37 @@
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 contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
21
+ # @!attribute [rw] content
22
+ # @return [String]
23
+ # Output only. The content of the TextSegment.
24
+ # @!attribute [rw] start_offset
25
+ # @return [Integer]
26
+ # Required. Zero-based character index of the first character of the text
27
+ # segment (counting characters from the beginning of the text).
28
+ # @!attribute [rw] end_offset
29
+ # @return [Integer]
30
+ # Required. Zero-based character index of the first character past the end of
31
+ # the text segment (counting character from the beginning of the text).
32
+ # The character at the end_offset is NOT included in the text segment.
33
+ class TextSegment; end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,76 @@
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 text sentiment.
21
+ # @!attribute [rw] sentiment
22
+ # @return [Integer]
23
+ # Output only. The sentiment with the semantic, as given to the
24
+ # {Google::Cloud::AutoML::V1beta1::AutoML::ImportData AutoML::ImportData} when populating the dataset from which the model used
25
+ # for the prediction had been trained.
26
+ # The sentiment values are between 0 and
27
+ # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
28
+ # with higher value meaning more positive sentiment. They are completely
29
+ # relative, i.e. 0 means least positive sentiment and sentiment_max means
30
+ # the most positive from the sentiments present in the train data. Therefore
31
+ # e.g. if train data had only negative sentiment, then sentiment_max, would
32
+ # be still negative (although least negative).
33
+ # The sentiment shouldn't be confused with "score" or "magnitude"
34
+ # from the previous Natural Language Sentiment Analysis API.
35
+ class TextSentimentAnnotation; end
36
+
37
+ # Model evaluation metrics for text sentiment problems.
38
+ # @!attribute [rw] precision
39
+ # @return [Float]
40
+ # Output only. Precision.
41
+ # @!attribute [rw] recall
42
+ # @return [Float]
43
+ # Output only. Recall.
44
+ # @!attribute [rw] f1_score
45
+ # @return [Float]
46
+ # Output only. The harmonic mean of recall and precision.
47
+ # @!attribute [rw] mean_absolute_error
48
+ # @return [Float]
49
+ # Output only. Mean absolute error. Only set for the overall model
50
+ # evaluation, not for evaluation of a single annotation spec.
51
+ # @!attribute [rw] mean_squared_error
52
+ # @return [Float]
53
+ # Output only. Mean squared error. Only set for the overall model
54
+ # evaluation, not for evaluation of a single annotation spec.
55
+ # @!attribute [rw] linear_kappa
56
+ # @return [Float]
57
+ # Output only. Linear weighted kappa. Only set for the overall model
58
+ # evaluation, not for evaluation of a single annotation spec.
59
+ # @!attribute [rw] quadratic_kappa
60
+ # @return [Float]
61
+ # Output only. Quadratic weighted kappa. Only set for the overall model
62
+ # evaluation, not for evaluation of a single annotation spec.
63
+ # @!attribute [rw] confusion_matrix
64
+ # @return [Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix]
65
+ # Output only. Confusion matrix of the evaluation.
66
+ # Only set for the overall model evaluation, not for evaluation of a single
67
+ # annotation spec.
68
+ # @!attribute [rw] annotation_spec_id
69
+ # @return [Array<String>]
70
+ # Output only. The annotation spec ids used for this evaluation.
71
+ # Deprecated .
72
+ class TextSentimentEvaluationMetrics; end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,63 @@
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
+ # Dataset metadata that is specific to translation.
21
+ # @!attribute [rw] source_language_code
22
+ # @return [String]
23
+ # Required. The BCP-47 language code of the source language.
24
+ # @!attribute [rw] target_language_code
25
+ # @return [String]
26
+ # Required. The BCP-47 language code of the target language.
27
+ class TranslationDatasetMetadata; end
28
+
29
+ # Evaluation metrics for the dataset.
30
+ # @!attribute [rw] bleu_score
31
+ # @return [Float]
32
+ # Output only. BLEU score.
33
+ # @!attribute [rw] base_bleu_score
34
+ # @return [Float]
35
+ # Output only. BLEU score for base model.
36
+ class TranslationEvaluationMetrics; end
37
+
38
+ # Model metadata that is specific to translation.
39
+ # @!attribute [rw] base_model
40
+ # @return [String]
41
+ # The resource name of the model to use as a baseline to train the custom
42
+ # model. If unset, we use the default base model provided by Google
43
+ # Translate. Format:
44
+ # `projects/{project_id}/locations/{location_id}/models/{model_id}`
45
+ # @!attribute [rw] source_language_code
46
+ # @return [String]
47
+ # Output only. Inferred from the dataset.
48
+ # The source languge (The BCP-47 language code) that is used for training.
49
+ # @!attribute [rw] target_language_code
50
+ # @return [String]
51
+ # Output only. The target languge (The BCP-47 language code) that is used for
52
+ # training.
53
+ class TranslationModelMetadata; end
54
+
55
+ # Annotation details specific to translation.
56
+ # @!attribute [rw] translated_content
57
+ # @return [Google::Cloud::AutoML::V1beta1::TextSnippet]
58
+ # Output only . The translated content.
59
+ class TranslationAnnotation; end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,35 @@
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
+ # Dataset metadata specific to video classification.
21
+ # All Video Classification datasets are treated as multi label.
22
+ class VideoClassificationDatasetMetadata; end
23
+
24
+ # Dataset metadata specific to video object tracking.
25
+ class VideoObjectTrackingDatasetMetadata; end
26
+
27
+ # Model metadata specific to video classification.
28
+ class VideoClassificationModelMetadata; end
29
+
30
+ # Model metadata specific to video object tracking.
31
+ class VideoObjectTrackingModelMetadata; end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,51 @@
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 Longrunning
18
+ # This resource represents a long-running operation that is the result of a
19
+ # network API call.
20
+ # @!attribute [rw] name
21
+ # @return [String]
22
+ # The server-assigned name, which is only unique within the same service that
23
+ # originally returns it. If you use the default HTTP mapping, the
24
+ # `name` should have the format of `operations/some/unique/name`.
25
+ # @!attribute [rw] metadata
26
+ # @return [Google::Protobuf::Any]
27
+ # Service-specific metadata associated with the operation. It typically
28
+ # contains progress information and common metadata such as create time.
29
+ # Some services might not provide such metadata. Any method that returns a
30
+ # long-running operation should document the metadata type, if any.
31
+ # @!attribute [rw] done
32
+ # @return [true, false]
33
+ # If the value is `false`, it means the operation is still in progress.
34
+ # If `true`, the operation is completed, and either `error` or `response` is
35
+ # available.
36
+ # @!attribute [rw] error
37
+ # @return [Google::Rpc::Status]
38
+ # The error result of the operation in case of failure or cancellation.
39
+ # @!attribute [rw] response
40
+ # @return [Google::Protobuf::Any]
41
+ # The normal response of the operation in case of success. If the original
42
+ # method returns no data on success, such as `Delete`, the response is
43
+ # `google.protobuf.Empty`. If the original method is standard
44
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
45
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
46
+ # is the original method name. For example, if the original method name
47
+ # is `TakeSnapshot()`, the inferred response type is
48
+ # `TakeSnapshotResponse`.
49
+ class Operation; end
50
+ end
51
+ end