blob: ff2df875793dd8064bffa5b11faef86540b4139a [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="bigquery_v2.html">BigQuery API</a> . <a href="bigquery_v2.models.html">models</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(projectId, datasetId, modelId)</a></code></p>
79<p class="firstline">Deletes the model specified by modelId from the dataset.</p>
80<p class="toc_element">
81 <code><a href="#get">get(projectId, datasetId, modelId)</a></code></p>
82<p class="firstline">Gets the specified model resource by model ID.</p>
83<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070084 <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Lists all models in the specified dataset. Requires the READER dataset</p>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#patch">patch(projectId, datasetId, modelId, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Patch specific fields in the specified model.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(projectId, datasetId, modelId)</code>
95 <pre>Deletes the model specified by modelId from the dataset.
96
97Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070098 projectId: string, Required. Project ID of the model to delete. (required)
99 datasetId: string, Required. Dataset ID of the model to delete. (required)
100 modelId: string, Required. Model ID of the model to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101</pre>
102</div>
103
104<div class="method">
105 <code class="details" id="get">get(projectId, datasetId, modelId)</code>
106 <pre>Gets the specified model resource by model ID.
107
108Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 projectId: string, Required. Project ID of the requested model. (required)
110 datasetId: string, Required. Dataset ID of the requested model. (required)
111 modelId: string, Required. Model ID of the requested model. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112
113Returns:
114 An object of the form:
115
116 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model.
119 # The output of the model will have a &quot;predicted_&quot; prefix to these columns.
120 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
122 # specified (e.g., CREATE FUNCTION statement can omit the return type;
123 # in this case the output parameter does not have this &quot;type&quot; field).
124 # Examples:
125 # INT64: {type_kind=&quot;INT64&quot;}
126 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
127 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
128 # {type_kind=&quot;STRUCT&quot;,
129 # struct_type={fields=[
130 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
131 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
132 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700133 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
134 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
136 &quot;fields&quot;: [
137 # Object with schema name: StandardSqlField
138 ],
139 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700140 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700142 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
146 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
148 # specified (e.g., CREATE FUNCTION statement can omit the return type;
149 # in this case the output parameter does not have this &quot;type&quot; field).
150 # Examples:
151 # INT64: {type_kind=&quot;INT64&quot;}
152 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
153 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
154 # {type_kind=&quot;STRUCT&quot;,
155 # struct_type={fields=[
156 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
157 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
158 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700159 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
160 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
162 &quot;fields&quot;: [
163 # Object with schema name: StandardSqlField
164 ],
165 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700166 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700168 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 },
170 ],
171 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch.
172 # If not present, the model will persist indefinitely. Expired models
173 # will be deleted and their storage reclaimed. The defaultTableExpirationMs
174 # property of the encapsulating dataset can be used to set a default
175 # expirationTime on newly created models.
176 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
177 { # Information about a single training query run for the model.
178 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
179 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
180 { # Information about a single iteration of the training run.
181 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
182 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
183 &quot;index&quot;: 42, # Index of the iteration, 0 based.
184 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
185 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
186 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier
187 # refactoring if we want to use model-specific iteration results.
188 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models
189 # fitted in auto-arima. For non-auto-arima model, its size is one.
190 { # Arima model information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
192 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
193 3.14,
194 ],
195 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
196 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
197 3.14,
198 ],
199 },
200 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false
201 # when d is not 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported
203 # for one time series.
204 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
208 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700209 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
210 },
211 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700212 &quot;aic&quot;: 3.14, # AIC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700213 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
214 &quot;variance&quot;: 3.14, # Variance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700215 },
216 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 },
218 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for
220 # one time series.
221 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 ],
223 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700224 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
225 { # Information about a single cluster for clustering model.
226 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid
227 # to each point assigned to the cluster.
228 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
229 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
230 },
231 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 },
233 ],
234 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training # The evaluation metrics over training/eval data that were computed at the
235 # end of training.
236 # data or just the eval data based on whether eval data was used during
237 # training. These are not present for imported models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by # [Alpha] Populated for implicit feedback type matrix factorization
239 # models.
240 # feedback_type=implicit.
241 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the
242 # predicted confidence by comparing it to an ideal rank measured by the
243 # original ratings.
244 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank
245 # from the predicted confidence and dividing it by the original rank.
246 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit
247 # recommendation models except instead of computing the rating directly,
248 # the output from evaluate is computed against a preference which is 1 or 0
249 # depending on if the rating exists or not.
250 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and
251 # then averages all the precisions across all the users.
252 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
254 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
255 # models, the metrics are either macro-averaged or micro-averaged. When
256 # macro-averaged, the metrics are calculated for each label and then an
257 # unweighted average is taken of those values. When micro-averaged, the
258 # metric is calculated globally by counting the total number of correctly
259 # predicted rows.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
261 # classification models this is the positive class threshold.
262 # For multi-class classfication models this is the confidence
263 # threshold.
264 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
265 # metric.
266 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
267 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
268 # this is a macro-averaged metric.
269 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
270 # positive actual labels. For multiclass this is a macro-averaged
271 # metric treating each class as a binary classifier.
272 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
273 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700274 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
275 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 },
277 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
278 { # Confusion matrix for multi-class classification models.
279 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the
280 # confusion matrix.
281 &quot;rows&quot;: [ # One row per actual label.
282 { # A single row in the confusion matrix.
283 &quot;entries&quot;: [ # Info describing predicted label distribution.
284 { # A single entry in the confusion matrix.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700285 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will
287 # also add an entry indicating the number of items under the
288 # confidence threshold.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 },
290 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700291 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 },
293 ],
294 },
295 ],
296 },
297 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
298 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
299 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
300 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
301 { # Message containing the information about one cluster.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700302 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
304 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
305 { # Representative value of a single feature within the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700306 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this
307 # feature.
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
309 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
310 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are
311 # more than ten categories, we return top ten (by count) and return
312 # one more CategoryCount with category &quot;_OTHER_&quot; and count as
313 # aggregate counts of remaining categories.
314 { # Represents the count of a single category within the cluster.
315 &quot;category&quot;: &quot;A String&quot;, # The name of category.
316 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the
317 # cluster.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 },
319 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 },
322 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 ],
325 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700326 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700327 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
328 { # Confusion matrix for binary classification models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700329 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive
330 # prediction.
331 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700332 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700333 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
334 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
335 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual
336 # labels.
337 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
338 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
339 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700340 },
341 ],
342 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
343 # models, the metrics are either macro-averaged or micro-averaged. When
344 # macro-averaged, the metrics are calculated for each label and then an
345 # unweighted average is taken of those values. When micro-averaged, the
346 # metric is calculated globally by counting the total number of correctly
347 # predicted rows.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700348 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
349 # classification models this is the positive class threshold.
350 # For multi-class classfication models this is the confidence
351 # threshold.
352 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
353 # metric.
354 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
355 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
356 # this is a macro-averaged metric.
357 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
358 # positive actual labels. For multiclass this is a macro-averaged
359 # metric treating each class as a binary classifier.
360 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
361 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700362 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
363 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700364 },
365 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700366 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700367 },
368 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix # Populated for regression models and explicit feedback type matrix
369 # factorization models.
370 # factorization models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700371 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
372 &quot;rSquared&quot;: 3.14, # R^2 score.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700373 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
374 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
375 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700376 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 },
378 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes
379 # user specified and default options that were used.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700380 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
381 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
382 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the
383 # training data. Only applicable for classification models.
384 &quot;a_key&quot;: 3.14,
385 },
386 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent
387 # overfitting for boosted tree models.
388 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly
389 # any more (compared to min_relative_progress). Used only for iterative
390 # training algorithms.
391 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest
392 # of data will be used as training data. The format should be double.
393 # Accurate to two decimal places.
394 # Default value is 0.2.
395 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate
396 # strategy.
397 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
399 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
402 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
403 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
404 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
405 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
406 &quot;A String&quot;,
407 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700409 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
411 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is
412 # specified.
413 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix
414 # factorization.
415 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
416 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a
417 # feature.
418 # 1. When data_split_method is CUSTOM, the corresponding column should
419 # be boolean. The rows with true value tag are eval data, and the false
420 # are training data.
421 # 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION
422 # rows (from smallest to largest) in the corresponding column are used
423 # as training data, and the rest are eval data. It respects the order
424 # in Orderable data types:
425 # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
426 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative
427 # training algorithms.
428 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
429 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700430 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names.
431 # Suppose there is a struct A with field b.
432 # When false (default), the output feature name is A_b.
433 # When true, the output feature name is A.b.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
435 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only
436 # applicable for imported models.
437 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700438 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm
439 # when kmeans_initialization_method is CUSTOM.
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is
441 # less than &#x27;min_relative_progress&#x27;. Used only for iterative training
442 # algorithms.
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
444 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
445 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
446 },
447 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation # Data split result of the training run. Only set when the input data is
448 # actually split.
449 # data tables that were used to train the model.
450 &quot;trainingTable&quot;: { # Table reference of the training data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700451 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
453 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
454 },
455 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700456 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
458 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 },
460 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700461 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 ],
463 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700464 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
466 &quot;modelId&quot;: &quot;A String&quot;, # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 },
468 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
469 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
470 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
471 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the
472 # encryption configuration of the model data while stored in BigQuery
473 # storage. This field can be used with PatchModel to update encryption key
474 # for an already encrypted model.
475 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
476 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700477 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value
478 # is inherited from the dataset.
479 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
480 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
481 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize
482 # and group your models. Label keys and values can be no longer
483 # than 63 characters, can only contain lowercase letters, numeric
484 # characters, underscores and dashes. International characters are allowed.
485 # Label values are optional. Label keys must start with a letter and each
486 # label in the list must have a different key.
487 &quot;a_key&quot;: &quot;A String&quot;,
488 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490</div>
491
492<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700493 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 <pre>Lists all models in the specified dataset. Requires the READER dataset
495role.
496
497Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700498 projectId: string, Required. Project ID of the models to list. (required)
499 datasetId: string, Required. Dataset ID of the models to list. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700500 pageToken: string, Page token, returned by a previous call to request the next page of
501results
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700502 maxResults: integer, The maximum number of results to return in a single response page.
503Leverage the page tokens to iterate through the entire collection.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504
505Returns:
506 An object of the form:
507
508 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;models&quot;: [ # Models in the requested dataset. Only the following fields are populated:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 # model_reference, model_type, creation_time, last_modified_time and
511 # labels.
512 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700513 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model.
515 # The output of the model will have a &quot;predicted_&quot; prefix to these columns.
516 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700517 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
518 # specified (e.g., CREATE FUNCTION statement can omit the return type;
519 # in this case the output parameter does not have this &quot;type&quot; field).
520 # Examples:
521 # INT64: {type_kind=&quot;INT64&quot;}
522 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
523 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
524 # {type_kind=&quot;STRUCT&quot;,
525 # struct_type={fields=[
526 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
527 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
528 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700529 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
530 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
532 &quot;fields&quot;: [
533 # Object with schema name: StandardSqlField
534 ],
535 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700536 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700537 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700538 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Dan O'Mearadd494642020-05-01 07:42:23 -0700539 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
542 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
544 # specified (e.g., CREATE FUNCTION statement can omit the return type;
545 # in this case the output parameter does not have this &quot;type&quot; field).
546 # Examples:
547 # INT64: {type_kind=&quot;INT64&quot;}
548 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
549 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
550 # {type_kind=&quot;STRUCT&quot;,
551 # struct_type={fields=[
552 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
553 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
554 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700555 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
556 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
558 &quot;fields&quot;: [
559 # Object with schema name: StandardSqlField
560 ],
561 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700562 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700564 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700565 },
566 ],
567 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch.
568 # If not present, the model will persist indefinitely. Expired models
569 # will be deleted and their storage reclaimed. The defaultTableExpirationMs
570 # property of the encapsulating dataset can be used to set a default
571 # expirationTime on newly created models.
572 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
573 { # Information about a single training query run for the model.
574 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
575 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
576 { # Information about a single iteration of the training run.
577 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
578 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
579 &quot;index&quot;: 42, # Index of the iteration, 0 based.
580 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
581 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
582 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier
583 # refactoring if we want to use model-specific iteration results.
584 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models
585 # fitted in auto-arima. For non-auto-arima model, its size is one.
586 { # Arima model information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700587 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
588 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
589 3.14,
590 ],
591 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
592 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
593 3.14,
594 ],
595 },
596 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false
597 # when d is not 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported
599 # for one time series.
600 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700603 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
604 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700605 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
606 },
607 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700608 &quot;aic&quot;: 3.14, # AIC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700609 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
610 &quot;variance&quot;: 3.14, # Variance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700611 },
612 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 },
614 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for
616 # one time series.
617 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700618 ],
619 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700620 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
621 { # Information about a single cluster for clustering model.
622 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid
623 # to each point assigned to the cluster.
624 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
625 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
626 },
627 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 },
629 ],
630 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training # The evaluation metrics over training/eval data that were computed at the
631 # end of training.
632 # data or just the eval data based on whether eval data was used during
633 # training. These are not present for imported models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700634 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by # [Alpha] Populated for implicit feedback type matrix factorization
635 # models.
636 # feedback_type=implicit.
637 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the
638 # predicted confidence by comparing it to an ideal rank measured by the
639 # original ratings.
640 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank
641 # from the predicted confidence and dividing it by the original rank.
642 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit
643 # recommendation models except instead of computing the rating directly,
644 # the output from evaluate is computed against a preference which is 1 or 0
645 # depending on if the rating exists or not.
646 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and
647 # then averages all the precisions across all the users.
648 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
650 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
651 # models, the metrics are either macro-averaged or micro-averaged. When
652 # macro-averaged, the metrics are calculated for each label and then an
653 # unweighted average is taken of those values. When micro-averaged, the
654 # metric is calculated globally by counting the total number of correctly
655 # predicted rows.
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
657 # classification models this is the positive class threshold.
658 # For multi-class classfication models this is the confidence
659 # threshold.
660 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
661 # metric.
662 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
663 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
664 # this is a macro-averaged metric.
665 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
666 # positive actual labels. For multiclass this is a macro-averaged
667 # metric treating each class as a binary classifier.
668 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
669 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700670 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
671 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 },
673 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
674 { # Confusion matrix for multi-class classification models.
675 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the
676 # confusion matrix.
677 &quot;rows&quot;: [ # One row per actual label.
678 { # A single row in the confusion matrix.
679 &quot;entries&quot;: [ # Info describing predicted label distribution.
680 { # A single entry in the confusion matrix.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700681 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will
683 # also add an entry indicating the number of items under the
684 # confidence threshold.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 },
686 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700687 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 },
689 ],
690 },
691 ],
692 },
693 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
694 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
695 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
696 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
697 { # Message containing the information about one cluster.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700698 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
700 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
701 { # Representative value of a single feature within the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700702 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this
703 # feature.
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
705 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
706 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are
707 # more than ten categories, we return top ten (by count) and return
708 # one more CategoryCount with category &quot;_OTHER_&quot; and count as
709 # aggregate counts of remaining categories.
710 { # Represents the count of a single category within the cluster.
711 &quot;category&quot;: &quot;A String&quot;, # The name of category.
712 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the
713 # cluster.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 },
715 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 },
718 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 ],
721 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700722 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700723 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
724 { # Confusion matrix for binary classification models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700725 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive
726 # prediction.
727 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700728 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700729 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
730 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
731 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual
732 # labels.
733 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
734 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
735 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700736 },
737 ],
738 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
739 # models, the metrics are either macro-averaged or micro-averaged. When
740 # macro-averaged, the metrics are calculated for each label and then an
741 # unweighted average is taken of those values. When micro-averaged, the
742 # metric is calculated globally by counting the total number of correctly
743 # predicted rows.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700744 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
745 # classification models this is the positive class threshold.
746 # For multi-class classfication models this is the confidence
747 # threshold.
748 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
749 # metric.
750 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
751 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
752 # this is a macro-averaged metric.
753 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
754 # positive actual labels. For multiclass this is a macro-averaged
755 # metric treating each class as a binary classifier.
756 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
757 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700758 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
759 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700760 },
761 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700762 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700763 },
764 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix # Populated for regression models and explicit feedback type matrix
765 # factorization models.
766 # factorization models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700767 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
768 &quot;rSquared&quot;: 3.14, # R^2 score.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700769 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
770 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
771 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700772 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 },
774 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes
775 # user specified and default options that were used.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700776 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
777 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
778 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the
779 # training data. Only applicable for classification models.
780 &quot;a_key&quot;: 3.14,
781 },
782 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent
783 # overfitting for boosted tree models.
784 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly
785 # any more (compared to min_relative_progress). Used only for iterative
786 # training algorithms.
787 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest
788 # of data will be used as training data. The format should be double.
789 # Accurate to two decimal places.
790 # Default value is 0.2.
791 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate
792 # strategy.
793 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
795 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
798 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
799 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
800 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
801 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
802 &quot;A String&quot;,
803 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700805 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
807 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is
808 # specified.
809 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix
810 # factorization.
811 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
812 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a
813 # feature.
814 # 1. When data_split_method is CUSTOM, the corresponding column should
815 # be boolean. The rows with true value tag are eval data, and the false
816 # are training data.
817 # 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION
818 # rows (from smallest to largest) in the corresponding column are used
819 # as training data, and the rest are eval data. It respects the order
820 # in Orderable data types:
821 # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
822 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative
823 # training algorithms.
824 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
825 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700826 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names.
827 # Suppose there is a struct A with field b.
828 # When false (default), the output feature name is A_b.
829 # When true, the output feature name is A.b.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
831 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only
832 # applicable for imported models.
833 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700834 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm
835 # when kmeans_initialization_method is CUSTOM.
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is
837 # less than &#x27;min_relative_progress&#x27;. Used only for iterative training
838 # algorithms.
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
840 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
841 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
842 },
843 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation # Data split result of the training run. Only set when the input data is
844 # actually split.
845 # data tables that were used to train the model.
846 &quot;trainingTable&quot;: { # Table reference of the training data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700847 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
849 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
850 },
851 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700852 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
854 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 },
856 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700857 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 ],
859 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700860 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -0700861 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
862 &quot;modelId&quot;: &quot;A String&quot;, # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
865 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
866 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
867 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the
868 # encryption configuration of the model data while stored in BigQuery
869 # storage. This field can be used with PatchModel to update encryption key
870 # for an already encrypted model.
871 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
872 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700873 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value
874 # is inherited from the dataset.
875 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
876 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
877 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize
878 # and group your models. Label keys and values can be no longer
879 # than 63 characters, can only contain lowercase letters, numeric
880 # characters, underscores and dashes. International characters are allowed.
881 # Label values are optional. Label keys must start with a letter and each
882 # label in the list must have a different key.
883 &quot;a_key&quot;: &quot;A String&quot;,
884 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700887 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 }</pre>
889</div>
890
891<div class="method">
892 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
893 <pre>Retrieves the next page of results.
894
895Args:
896 previous_request: The request for the previous page. (required)
897 previous_response: The response from the request for the previous page. (required)
898
899Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700901 page. Returns None if there are no more items in the collection.
902 </pre>
903</div>
904
905<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 <code class="details" id="patch">patch(projectId, datasetId, modelId, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 <pre>Patch specific fields in the specified model.
908
909Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 projectId: string, Required. Project ID of the model to patch. (required)
911 datasetId: string, Required. Dataset ID of the model to patch. (required)
912 modelId: string, Required. Model ID of the model to patch. (required)
913 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 The object takes the form of:
915
916{
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700917 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model.
919 # The output of the model will have a &quot;predicted_&quot; prefix to these columns.
920 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
922 # specified (e.g., CREATE FUNCTION statement can omit the return type;
923 # in this case the output parameter does not have this &quot;type&quot; field).
924 # Examples:
925 # INT64: {type_kind=&quot;INT64&quot;}
926 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
927 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
928 # {type_kind=&quot;STRUCT&quot;,
929 # struct_type={fields=[
930 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
931 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
932 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700933 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
934 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
936 &quot;fields&quot;: [
937 # Object with schema name: StandardSqlField
938 ],
939 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700940 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700942 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 },
944 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
946 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
948 # specified (e.g., CREATE FUNCTION statement can omit the return type;
949 # in this case the output parameter does not have this &quot;type&quot; field).
950 # Examples:
951 # INT64: {type_kind=&quot;INT64&quot;}
952 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
953 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
954 # {type_kind=&quot;STRUCT&quot;,
955 # struct_type={fields=[
956 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
957 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
958 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700959 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
960 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
962 &quot;fields&quot;: [
963 # Object with schema name: StandardSqlField
964 ],
965 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700966 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700967 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700968 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 },
970 ],
971 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch.
972 # If not present, the model will persist indefinitely. Expired models
973 # will be deleted and their storage reclaimed. The defaultTableExpirationMs
974 # property of the encapsulating dataset can be used to set a default
975 # expirationTime on newly created models.
976 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
977 { # Information about a single training query run for the model.
978 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
979 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
980 { # Information about a single iteration of the training run.
981 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
982 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
983 &quot;index&quot;: 42, # Index of the iteration, 0 based.
984 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
985 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
986 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier
987 # refactoring if we want to use model-specific iteration results.
988 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models
989 # fitted in auto-arima. For non-auto-arima model, its size is one.
990 { # Arima model information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700991 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
992 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
993 3.14,
994 ],
995 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
996 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
997 3.14,
998 ],
999 },
1000 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false
1001 # when d is not 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported
1003 # for one time series.
1004 &quot;A String&quot;,
1005 ],
1006 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1008 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001009 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1010 },
1011 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001012 &quot;aic&quot;: 3.14, # AIC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001013 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1014 &quot;variance&quot;: 3.14, # Variance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001015 },
1016 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 },
1018 ],
1019 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for
1020 # one time series.
1021 &quot;A String&quot;,
1022 ],
1023 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001024 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
1025 { # Information about a single cluster for clustering model.
1026 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid
1027 # to each point assigned to the cluster.
1028 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
1029 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
1030 },
1031 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 },
1033 ],
1034 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training # The evaluation metrics over training/eval data that were computed at the
1035 # end of training.
1036 # data or just the eval data based on whether eval data was used during
1037 # training. These are not present for imported models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001038 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by # [Alpha] Populated for implicit feedback type matrix factorization
1039 # models.
1040 # feedback_type=implicit.
1041 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the
1042 # predicted confidence by comparing it to an ideal rank measured by the
1043 # original ratings.
1044 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank
1045 # from the predicted confidence and dividing it by the original rank.
1046 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit
1047 # recommendation models except instead of computing the rating directly,
1048 # the output from evaluate is computed against a preference which is 1 or 0
1049 # depending on if the rating exists or not.
1050 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and
1051 # then averages all the precisions across all the users.
1052 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
1054 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
1055 # models, the metrics are either macro-averaged or micro-averaged. When
1056 # macro-averaged, the metrics are calculated for each label and then an
1057 # unweighted average is taken of those values. When micro-averaged, the
1058 # metric is calculated globally by counting the total number of correctly
1059 # predicted rows.
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
1061 # classification models this is the positive class threshold.
1062 # For multi-class classfication models this is the confidence
1063 # threshold.
1064 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
1065 # metric.
1066 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1067 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
1068 # this is a macro-averaged metric.
1069 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
1070 # positive actual labels. For multiclass this is a macro-averaged
1071 # metric treating each class as a binary classifier.
1072 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
1073 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001074 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
1075 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 },
1077 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
1078 { # Confusion matrix for multi-class classification models.
1079 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the
1080 # confusion matrix.
1081 &quot;rows&quot;: [ # One row per actual label.
1082 { # A single row in the confusion matrix.
1083 &quot;entries&quot;: [ # Info describing predicted label distribution.
1084 { # A single entry in the confusion matrix.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001085 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will
1087 # also add an entry indicating the number of items under the
1088 # confidence threshold.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 },
1090 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001091 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Bu Sun Kim65020912020-05-20 12:08:20 -07001092 },
1093 ],
1094 },
1095 ],
1096 },
1097 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
1098 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
1099 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
1100 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
1101 { # Message containing the information about one cluster.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001102 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
1104 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
1105 { # Representative value of a single feature within the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001106 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this
1107 # feature.
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
1109 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
1110 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are
1111 # more than ten categories, we return top ten (by count) and return
1112 # one more CategoryCount with category &quot;_OTHER_&quot; and count as
1113 # aggregate counts of remaining categories.
1114 { # Represents the count of a single category within the cluster.
1115 &quot;category&quot;: &quot;A String&quot;, # The name of category.
1116 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the
1117 # cluster.
1118 },
1119 ],
1120 },
1121 },
1122 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001123 },
1124 ],
1125 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001126 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001127 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
1128 { # Confusion matrix for binary classification models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001129 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive
1130 # prediction.
1131 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001132 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001133 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
1134 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
1135 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual
1136 # labels.
1137 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
1138 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
1139 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001140 },
1141 ],
1142 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
1143 # models, the metrics are either macro-averaged or micro-averaged. When
1144 # macro-averaged, the metrics are calculated for each label and then an
1145 # unweighted average is taken of those values. When micro-averaged, the
1146 # metric is calculated globally by counting the total number of correctly
1147 # predicted rows.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001148 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
1149 # classification models this is the positive class threshold.
1150 # For multi-class classfication models this is the confidence
1151 # threshold.
1152 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
1153 # metric.
1154 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1155 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
1156 # this is a macro-averaged metric.
1157 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
1158 # positive actual labels. For multiclass this is a macro-averaged
1159 # metric treating each class as a binary classifier.
1160 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
1161 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001162 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
1163 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001164 },
1165 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001166 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001167 },
1168 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix # Populated for regression models and explicit feedback type matrix
1169 # factorization models.
1170 # factorization models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001171 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
1172 &quot;rSquared&quot;: 3.14, # R^2 score.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001173 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
1174 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
1175 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001176 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 },
1178 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes
1179 # user specified and default options that were used.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001180 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
1181 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
1182 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the
1183 # training data. Only applicable for classification models.
1184 &quot;a_key&quot;: 3.14,
1185 },
1186 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent
1187 # overfitting for boosted tree models.
1188 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly
1189 # any more (compared to min_relative_progress). Used only for iterative
1190 # training algorithms.
1191 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest
1192 # of data will be used as training data. The format should be double.
1193 # Accurate to two decimal places.
1194 # Default value is 0.2.
1195 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate
1196 # strategy.
1197 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
1199 &quot;A String&quot;,
1200 ],
1201 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
1202 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
1203 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
1204 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
1205 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
1206 &quot;A String&quot;,
1207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001209 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -07001210 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
1211 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is
1212 # specified.
1213 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix
1214 # factorization.
1215 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
1216 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a
1217 # feature.
1218 # 1. When data_split_method is CUSTOM, the corresponding column should
1219 # be boolean. The rows with true value tag are eval data, and the false
1220 # are training data.
1221 # 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION
1222 # rows (from smallest to largest) in the corresponding column are used
1223 # as training data, and the rest are eval data. It respects the order
1224 # in Orderable data types:
1225 # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
1226 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative
1227 # training algorithms.
1228 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
1229 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001230 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names.
1231 # Suppose there is a struct A with field b.
1232 # When false (default), the output feature name is A_b.
1233 # When true, the output feature name is A.b.
Bu Sun Kim65020912020-05-20 12:08:20 -07001234 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
1235 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only
1236 # applicable for imported models.
1237 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001238 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm
1239 # when kmeans_initialization_method is CUSTOM.
Bu Sun Kim65020912020-05-20 12:08:20 -07001240 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is
1241 # less than &#x27;min_relative_progress&#x27;. Used only for iterative training
1242 # algorithms.
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
1244 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
1245 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
1246 },
1247 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation # Data split result of the training run. Only set when the input data is
1248 # actually split.
1249 # data tables that were used to train the model.
1250 &quot;trainingTable&quot;: { # Table reference of the training data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001251 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001252 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1253 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1254 },
1255 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001256 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1258 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1259 },
1260 },
1261 },
1262 ],
1263 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001264 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -07001265 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1266 &quot;modelId&quot;: &quot;A String&quot;, # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001267 },
1268 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
1269 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
1270 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
1271 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the
1272 # encryption configuration of the model data while stored in BigQuery
1273 # storage. This field can be used with PatchModel to update encryption key
1274 # for an already encrypted model.
1275 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
1276 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001277 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value
1278 # is inherited from the dataset.
1279 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
1280 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
1281 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize
1282 # and group your models. Label keys and values can be no longer
1283 # than 63 characters, can only contain lowercase letters, numeric
1284 # characters, underscores and dashes. International characters are allowed.
1285 # Label values are optional. Label keys must start with a letter and each
1286 # label in the list must have a different key.
1287 &quot;a_key&quot;: &quot;A String&quot;,
1288 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001289}
1290
1291
1292Returns:
1293 An object of the form:
1294
1295 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001296 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model.
1298 # The output of the model will have a &quot;predicted_&quot; prefix to these columns.
1299 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -07001300 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
1301 # specified (e.g., CREATE FUNCTION statement can omit the return type;
1302 # in this case the output parameter does not have this &quot;type&quot; field).
1303 # Examples:
1304 # INT64: {type_kind=&quot;INT64&quot;}
1305 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
1306 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
1307 # {type_kind=&quot;STRUCT&quot;,
1308 # struct_type={fields=[
1309 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
1310 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
1311 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001312 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
1313 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1315 &quot;fields&quot;: [
1316 # Object with schema name: StandardSqlField
1317 ],
1318 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001319 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001320 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001321 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -07001322 },
1323 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001324 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
1325 { # A field or a column.
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 &quot;type&quot;: { # The type of a variable, e.g., a function argument. # Optional. The type of this parameter. Absent if not explicitly
1327 # specified (e.g., CREATE FUNCTION statement can omit the return type;
1328 # in this case the output parameter does not have this &quot;type&quot; field).
1329 # Examples:
1330 # INT64: {type_kind=&quot;INT64&quot;}
1331 # ARRAY&lt;STRING&gt;: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;}
1332 # STRUCT&lt;x STRING, y ARRAY&lt;DATE&gt;&gt;:
1333 # {type_kind=&quot;STRUCT&quot;,
1334 # struct_type={fields=[
1335 # {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}},
1336 # {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}}
1337 # ]}}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001338 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field.
1339 # Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
Bu Sun Kim65020912020-05-20 12:08:20 -07001340 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1341 &quot;fields&quot;: [
1342 # Object with schema name: StandardSqlField
1343 ],
1344 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001345 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001347 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 },
1349 ],
1350 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch.
1351 # If not present, the model will persist indefinitely. Expired models
1352 # will be deleted and their storage reclaimed. The defaultTableExpirationMs
1353 # property of the encapsulating dataset can be used to set a default
1354 # expirationTime on newly created models.
1355 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 { # Information about a single training query run for the model.
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
1358 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
1359 { # Information about a single iteration of the training run.
1360 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
1361 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
1362 &quot;index&quot;: 42, # Index of the iteration, 0 based.
1363 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
1364 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
1365 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier
1366 # refactoring if we want to use model-specific iteration results.
1367 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models
1368 # fitted in auto-arima. For non-auto-arima model, its size is one.
1369 { # Arima model information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001370 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
1371 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
1372 3.14,
1373 ],
1374 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
1375 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
1376 3.14,
1377 ],
1378 },
1379 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false
1380 # when d is not 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported
1382 # for one time series.
1383 &quot;A String&quot;,
1384 ],
1385 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1387 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001388 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1389 },
1390 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001391 &quot;aic&quot;: 3.14, # AIC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001392 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1393 &quot;variance&quot;: 3.14, # Variance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001394 },
1395 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 },
1397 ],
1398 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for
1399 # one time series.
1400 &quot;A String&quot;,
1401 ],
1402 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001403 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
1404 { # Information about a single cluster for clustering model.
1405 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid
1406 # to each point assigned to the cluster.
1407 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
1408 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
1409 },
1410 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 },
1412 ],
1413 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training # The evaluation metrics over training/eval data that were computed at the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001414 # end of training.
1415 # data or just the eval data based on whether eval data was used during
1416 # training. These are not present for imported models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001417 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by # [Alpha] Populated for implicit feedback type matrix factorization
1418 # models.
1419 # feedback_type=implicit.
1420 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the
1421 # predicted confidence by comparing it to an ideal rank measured by the
1422 # original ratings.
1423 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank
1424 # from the predicted confidence and dividing it by the original rank.
1425 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit
1426 # recommendation models except instead of computing the rating directly,
1427 # the output from evaluate is computed against a preference which is 1 or 0
1428 # depending on if the rating exists or not.
1429 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and
1430 # then averages all the precisions across all the users.
1431 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001432 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
1433 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
1434 # models, the metrics are either macro-averaged or micro-averaged. When
1435 # macro-averaged, the metrics are calculated for each label and then an
1436 # unweighted average is taken of those values. When micro-averaged, the
1437 # metric is calculated globally by counting the total number of correctly
1438 # predicted rows.
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
1440 # classification models this is the positive class threshold.
1441 # For multi-class classfication models this is the confidence
1442 # threshold.
1443 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
1444 # metric.
1445 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1446 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
1447 # this is a macro-averaged metric.
1448 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
1449 # positive actual labels. For multiclass this is a macro-averaged
1450 # metric treating each class as a binary classifier.
1451 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
1452 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001453 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
1454 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim65020912020-05-20 12:08:20 -07001455 },
1456 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
1457 { # Confusion matrix for multi-class classification models.
1458 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the
1459 # confusion matrix.
1460 &quot;rows&quot;: [ # One row per actual label.
1461 { # A single row in the confusion matrix.
1462 &quot;entries&quot;: [ # Info describing predicted label distribution.
1463 { # A single entry in the confusion matrix.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001464 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will
1466 # also add an entry indicating the number of items under the
1467 # confidence threshold.
Bu Sun Kim65020912020-05-20 12:08:20 -07001468 },
1469 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001470 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Bu Sun Kim65020912020-05-20 12:08:20 -07001471 },
1472 ],
1473 },
1474 ],
1475 },
1476 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
1477 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
1478 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
1479 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 { # Message containing the information about one cluster.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001481 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
1483 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
Dan O'Mearadd494642020-05-01 07:42:23 -07001484 { # Representative value of a single feature within the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001485 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this
1486 # feature.
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
1488 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
1489 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are
Dan O'Mearadd494642020-05-01 07:42:23 -07001490 # more than ten categories, we return top ten (by count) and return
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 # one more CategoryCount with category &quot;_OTHER_&quot; and count as
Dan O'Mearadd494642020-05-01 07:42:23 -07001492 # aggregate counts of remaining categories.
1493 { # Represents the count of a single category within the cluster.
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 &quot;category&quot;: &quot;A String&quot;, # The name of category.
1495 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the
Dan O'Mearadd494642020-05-01 07:42:23 -07001496 # cluster.
1497 },
1498 ],
1499 },
1500 },
1501 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001502 },
1503 ],
1504 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001505 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001506 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
1507 { # Confusion matrix for binary classification models.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001508 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive
1509 # prediction.
1510 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001511 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001512 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
1513 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
1514 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual
1515 # labels.
1516 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
1517 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
1518 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001519 },
1520 ],
1521 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class # Aggregate classification metrics.
1522 # models, the metrics are either macro-averaged or micro-averaged. When
1523 # macro-averaged, the metrics are calculated for each label and then an
1524 # unweighted average is taken of those values. When micro-averaged, the
1525 # metric is calculated globally by counting the total number of correctly
1526 # predicted rows.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001527 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary
1528 # classification models this is the positive class threshold.
1529 # For multi-class classfication models this is the confidence
1530 # threshold.
1531 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged
1532 # metric.
1533 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1534 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass
1535 # this is a macro-averaged metric.
1536 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had
1537 # positive actual labels. For multiclass this is a macro-averaged
1538 # metric treating each class as a binary classifier.
1539 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For
1540 # multiclass this is a micro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001541 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a
1542 # positive prediction. For multiclass this is a macro-averaged metric.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001543 },
1544 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001545 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001546 },
1547 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix # Populated for regression models and explicit feedback type matrix
1548 # factorization models.
1549 # factorization models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001550 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
1551 &quot;rSquared&quot;: 3.14, # R^2 score.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001552 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
1553 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
1554 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001555 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001556 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558 # user specified and default options that were used.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001559 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
1560 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
1561 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the
1562 # training data. Only applicable for classification models.
1563 &quot;a_key&quot;: 3.14,
1564 },
1565 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent
1566 # overfitting for boosted tree models.
1567 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly
1568 # any more (compared to min_relative_progress). Used only for iterative
1569 # training algorithms.
1570 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest
1571 # of data will be used as training data. The format should be double.
1572 # Accurate to two decimal places.
1573 # Default value is 0.2.
1574 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate
1575 # strategy.
1576 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
1578 &quot;A String&quot;,
1579 ],
1580 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
1581 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
1582 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
1583 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
1584 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
1585 &quot;A String&quot;,
1586 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001587 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001588 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
1590 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is
1591 # specified.
1592 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix
1593 # factorization.
1594 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
1595 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001596 # feature.
1597 # 1. When data_split_method is CUSTOM, the corresponding column should
1598 # be boolean. The rows with true value tag are eval data, and the false
1599 # are training data.
1600 # 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION
1601 # rows (from smallest to largest) in the corresponding column are used
1602 # as training data, and the rest are eval data. It respects the order
1603 # in Orderable data types:
1604 # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative
1606 # training algorithms.
1607 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
1608 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001609 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names.
1610 # Suppose there is a struct A with field b.
1611 # When false (default), the output feature name is A_b.
1612 # When true, the output feature name is A.b.
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
1614 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001615 # applicable for imported models.
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001617 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm
1618 # when kmeans_initialization_method is CUSTOM.
Bu Sun Kim65020912020-05-20 12:08:20 -07001619 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is
1620 # less than &#x27;min_relative_progress&#x27;. Used only for iterative training
1621 # algorithms.
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
1623 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
1624 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001625 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001626 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation # Data split result of the training run. Only set when the input data is
1627 # actually split.
1628 # data tables that were used to train the model.
1629 &quot;trainingTable&quot;: { # Table reference of the training data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001630 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1632 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001635 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1637 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001639 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001640 },
1641 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001642 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001643 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -07001644 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1645 &quot;modelId&quot;: &quot;A String&quot;, # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001646 },
1647 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
1648 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
1649 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
1650 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the
Dan O'Mearadd494642020-05-01 07:42:23 -07001651 # encryption configuration of the model data while stored in BigQuery
1652 # storage. This field can be used with PatchModel to update encryption key
1653 # for an already encrypted model.
Bu Sun Kim65020912020-05-20 12:08:20 -07001654 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001655 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001656 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value
1657 # is inherited from the dataset.
1658 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
1659 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
1660 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize
1661 # and group your models. Label keys and values can be no longer
1662 # than 63 characters, can only contain lowercase letters, numeric
1663 # characters, underscores and dashes. International characters are allowed.
1664 # Label values are optional. Label keys must start with a letter and each
1665 # label in the list must have a different key.
1666 &quot;a_key&quot;: &quot;A String&quot;,
1667 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001668 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669</div>
1670
1671</body></html>