blob: 2ca3f213f14a2cc7d3366d2053776bcf6c342f68 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(projectId, datasetId, modelId)</a></code></p>
82<p class="firstline">Deletes the model specified by modelId from the dataset.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, datasetId, modelId)</a></code></p>
85<p class="firstline">Gets the specified model resource by model ID.</p>
86<p class="toc_element">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -080087 <code><a href="#list">list(projectId, datasetId, maxResults=None, pageToken=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Lists all models in the specified dataset. Requires the READER dataset role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(projectId, datasetId, modelId, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Patch specific fields in the specified model.</p>
95<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code class="details" id="delete">delete(projectId, datasetId, modelId)</code>
103 <pre>Deletes the model specified by modelId from the dataset.
104
105Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 projectId: string, Required. Project ID of the model to delete. (required)
107 datasetId: string, Required. Dataset ID of the model to delete. (required)
108 modelId: string, Required. Model ID of the model to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109</pre>
110</div>
111
112<div class="method">
113 <code class="details" id="get">get(projectId, datasetId, modelId)</code>
114 <pre>Gets the specified model resource by model ID.
115
116Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 projectId: string, Required. Project ID of the requested model. (required)
118 datasetId: string, Required. Dataset ID of the requested model. (required)
119 modelId: string, Required. Model ID of the requested model. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120
121Returns:
122 An object of the form:
123
124 {
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800125 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
126 { # Information about a single training query run for the model.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800127 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
128 { # Information about a single iteration of the training run.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800129 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
130 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
131 &quot;index&quot;: 42, # Index of the iteration, 0 based.
132 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800133 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800134 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
135 &quot;A String&quot;,
136 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800137 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
138 { # Arima model information.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800139 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
140 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
141 &quot;A String&quot;,
142 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800143 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800144 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
145 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
146 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
147 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
148 },
149 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
150 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
151 3.14,
152 ],
153 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
154 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
155 3.14,
156 ],
157 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
159 &quot;variance&quot;: 3.14, # Variance.
160 &quot;aic&quot;: 3.14, # AIC.
161 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
162 },
163 },
164 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800165 },
166 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
167 { # Information about a single cluster for clustering model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800168 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800169 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
170 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800171 },
172 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800173 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800174 },
175 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800176 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800177 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models. # The evaluation metrics over training/eval data that were computed at the end of training.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800178 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800179 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800180 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
181 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800182 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
183 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
184 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
185 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800186 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
187 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800188 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
189 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
190 { # Confusion matrix for binary classification models.
191 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
192 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
193 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
194 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
195 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
196 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
197 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
198 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
199 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
200 },
201 ],
202 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
203 },
204 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800205 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
206 { # Confusion matrix for multi-class classification models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800207 &quot;rows&quot;: [ # One row per actual label.
208 { # A single row in the confusion matrix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800209 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800210 &quot;entries&quot;: [ # Info describing predicted label distribution.
211 { # A single entry in the confusion matrix.
212 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
213 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will also add an entry indicating the number of items under the confidence threshold.
214 },
215 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800216 },
217 ],
218 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
219 },
220 ],
221 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
222 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
223 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
224 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
225 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
226 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
227 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
228 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
229 },
230 },
231 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
232 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
233 { # Message containing the information about one cluster.
234 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
235 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
236 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
237 { # Representative value of a single feature within the cluster.
238 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
239 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
240 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
241 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category &quot;_OTHER_&quot; and count as aggregate counts of remaining categories.
242 { # Represents the count of a single category within the cluster.
243 &quot;category&quot;: &quot;A String&quot;, # The name of category.
244 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
245 },
246 ],
247 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800248 },
249 ],
250 },
251 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800252 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
253 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800254 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800255 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
256 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
257 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
258 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
259 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
260 },
261 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models.
262 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
263 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
264 &quot;rSquared&quot;: 3.14, # R^2 score.
265 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
266 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800267 },
268 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800269 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
270 True or False,
271 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800272 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
273 &quot;A String&quot;,
274 ],
275 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
276 &quot;A String&quot;,
277 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800278 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
279 { # ARIMA model fitting metrics.
280 &quot;variance&quot;: 3.14, # Variance.
281 &quot;aic&quot;: 3.14, # AIC.
282 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
283 },
284 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800285 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
286 { # Arima order, can be used for both non-seasonal and seasonal parts.
287 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
288 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
289 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
290 },
291 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800292 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
293 { # Model evaluation metrics for a single ARIMA forecasting model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800294 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
295 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
296 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
297 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
298 },
299 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800300 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800301 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
302 &quot;A String&quot;,
303 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800304 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800305 &quot;variance&quot;: 3.14, # Variance.
306 &quot;aic&quot;: 3.14, # AIC.
307 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
308 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800309 },
310 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800311 },
312 },
313 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation data tables that were used to train the model. # Data split result of the training run. Only set when the input data is actually split.
314 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
315 &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.
316 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
317 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
318 },
319 &quot;trainingTable&quot;: { # Table reference of the training data after split.
320 &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.
321 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
322 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
323 },
324 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800325 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
326 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
327 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
328 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
329 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
330 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
331 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
332 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
333 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
334 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
335 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
336 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
337 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
338 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
339 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
340 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is less than &#x27;min_relative_progress&#x27;. Used only for iterative training algorithms.
341 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
342 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
343 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
344 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800345 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800346 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
347 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
348 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
349 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
350 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
351 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
352 &quot;A String&quot;,
353 ],
354 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
355 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
356 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
357 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
358 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
359 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
360 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
361 &quot;A String&quot;,
362 ],
363 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
364 &quot;holidayRegion&quot;: &quot;A String&quot;, # The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
365 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
366 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
367 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
368 &quot;a_key&quot;: 3.14,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800369 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800370 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
371 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
372 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
373 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
374 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
375 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
376 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
377 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
378 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800379 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800380 &quot;globalExplanations&quot;: [ # Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
381 { # Global explanations containing the top most important features after training.
382 &quot;explanations&quot;: [ # A list of the top global explanations. Sorted by absolute value of attribution in descending order.
383 { # Explanation for a single feature.
384 &quot;attribution&quot;: 3.14, # Attribution of feature.
385 &quot;featureName&quot;: &quot;A String&quot;, # Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
386 },
387 ],
388 &quot;classLabel&quot;: &quot;A String&quot;, # Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
389 },
390 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800391 },
392 ],
393 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800394 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
395 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
396 &quot;a_key&quot;: &quot;A String&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800397 },
398 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800399 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
400 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
401 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
402 { # A field or a column.
403 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
404 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
405 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
406 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
407 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
408 &quot;fields&quot;: [
409 # Object with schema name: StandardSqlField
410 ],
411 },
412 },
413 },
414 ],
415 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model. The output of the model will have a &quot;predicted_&quot; prefix to these columns.
416 { # A field or a column.
417 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
418 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
419 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
420 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
421 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
422 &quot;fields&quot;: [
423 # Object with schema name: StandardSqlField
424 ],
425 },
426 },
427 },
428 ],
429 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
430 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
431 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
432 &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.
433 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
434 },
435 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
436 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
437 &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.
438 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800439 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
440 }</pre>
441</div>
442
443<div class="method">
444 <code class="details" id="list">list(projectId, datasetId, maxResults=None, pageToken=None)</code>
445 <pre>Lists all models in the specified dataset. Requires the READER dataset role.
446
447Args:
448 projectId: string, Required. Project ID of the models to list. (required)
449 datasetId: string, Required. Dataset ID of the models to list. (required)
450 maxResults: integer, The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
451 pageToken: string, Page token, returned by a previous call to request the next page of results
452
453Returns:
454 An object of the form:
455
456 {
457 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
458 &quot;models&quot;: [ # Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels.
459 {
460 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
461 { # Information about a single training query run for the model.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800462 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
463 { # Information about a single iteration of the training run.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800464 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
465 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
466 &quot;index&quot;: 42, # Index of the iteration, 0 based.
467 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800468 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800469 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
470 &quot;A String&quot;,
471 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800472 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
473 { # Arima model information.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800474 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
475 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
476 &quot;A String&quot;,
477 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800478 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800479 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
480 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
481 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
482 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
483 },
484 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
485 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
486 3.14,
487 ],
488 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
489 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
490 3.14,
491 ],
492 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800493 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
494 &quot;variance&quot;: 3.14, # Variance.
495 &quot;aic&quot;: 3.14, # AIC.
496 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
497 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800498 },
499 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800500 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800501 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
502 { # Information about a single cluster for clustering model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800503 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800504 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
505 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800506 },
507 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800508 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800509 },
510 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800511 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800512 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models. # The evaluation metrics over training/eval data that were computed at the end of training.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800513 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800514 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800515 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
516 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800517 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
518 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
519 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
520 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800521 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800522 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800523 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
524 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
525 { # Confusion matrix for binary classification models.
526 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
527 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
528 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
529 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
530 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
531 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
532 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
533 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
534 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
535 },
536 ],
537 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
538 },
539 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800540 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
541 { # Confusion matrix for multi-class classification models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800542 &quot;rows&quot;: [ # One row per actual label.
543 { # A single row in the confusion matrix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800544 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800545 &quot;entries&quot;: [ # Info describing predicted label distribution.
546 { # A single entry in the confusion matrix.
547 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
548 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will also add an entry indicating the number of items under the confidence threshold.
549 },
550 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800551 },
552 ],
553 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
554 },
555 ],
556 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
557 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
558 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
559 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
560 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
561 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
562 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
563 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
564 },
565 },
566 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
567 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
568 { # Message containing the information about one cluster.
569 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
570 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
571 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
572 { # Representative value of a single feature within the cluster.
573 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
574 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
575 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
576 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category &quot;_OTHER_&quot; and count as aggregate counts of remaining categories.
577 { # Represents the count of a single category within the cluster.
578 &quot;category&quot;: &quot;A String&quot;, # The name of category.
579 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
580 },
581 ],
582 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800583 },
584 ],
585 },
586 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800587 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
588 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800589 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800590 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
591 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
592 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
593 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
594 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
595 },
596 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models.
597 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
598 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
599 &quot;rSquared&quot;: 3.14, # R^2 score.
600 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
601 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800602 },
603 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800604 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
605 True or False,
606 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800607 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
608 &quot;A String&quot;,
609 ],
610 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
611 &quot;A String&quot;,
612 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800613 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
614 { # ARIMA model fitting metrics.
615 &quot;variance&quot;: 3.14, # Variance.
616 &quot;aic&quot;: 3.14, # AIC.
617 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
618 },
619 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800620 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
621 { # Arima order, can be used for both non-seasonal and seasonal parts.
622 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
623 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
624 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
625 },
626 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800627 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
628 { # Model evaluation metrics for a single ARIMA forecasting model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800629 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
630 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
631 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
632 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
633 },
634 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800635 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800636 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
637 &quot;A String&quot;,
638 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800639 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
640 &quot;variance&quot;: 3.14, # Variance.
641 &quot;aic&quot;: 3.14, # AIC.
642 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
643 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800644 },
645 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800646 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800647 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800648 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation data tables that were used to train the model. # Data split result of the training run. Only set when the input data is actually split.
649 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
650 &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.
651 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
652 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
653 },
654 &quot;trainingTable&quot;: { # Table reference of the training data after split.
655 &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.
656 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
657 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
658 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800659 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800660 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
661 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
662 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
663 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
664 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
665 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
666 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
667 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
668 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
669 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
670 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
671 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
672 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
673 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
674 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
675 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is less than &#x27;min_relative_progress&#x27;. Used only for iterative training algorithms.
676 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
677 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
678 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
679 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800680 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800681 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
682 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
683 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
684 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
685 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
686 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
687 &quot;A String&quot;,
688 ],
689 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
690 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
691 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
692 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
693 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
694 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
695 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
696 &quot;A String&quot;,
697 ],
698 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
699 &quot;holidayRegion&quot;: &quot;A String&quot;, # The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
700 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
701 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
702 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
703 &quot;a_key&quot;: 3.14,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800704 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800705 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
706 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
707 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
708 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
709 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
710 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
711 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
712 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
713 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800714 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800715 &quot;globalExplanations&quot;: [ # Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
716 { # Global explanations containing the top most important features after training.
717 &quot;explanations&quot;: [ # A list of the top global explanations. Sorted by absolute value of attribution in descending order.
718 { # Explanation for a single feature.
719 &quot;attribution&quot;: 3.14, # Attribution of feature.
720 &quot;featureName&quot;: &quot;A String&quot;, # Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
721 },
722 ],
723 &quot;classLabel&quot;: &quot;A String&quot;, # Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
724 },
725 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800726 },
727 ],
728 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800729 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
730 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
731 &quot;a_key&quot;: &quot;A String&quot;,
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800732 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800733 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800734 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
735 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
736 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
737 { # A field or a column.
738 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
739 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
740 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
741 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
742 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
743 &quot;fields&quot;: [
744 # Object with schema name: StandardSqlField
745 ],
746 },
747 },
748 },
749 ],
750 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model. The output of the model will have a &quot;predicted_&quot; prefix to these columns.
751 { # A field or a column.
752 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
753 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
754 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
755 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
756 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
757 &quot;fields&quot;: [
758 # Object with schema name: StandardSqlField
759 ],
760 },
761 },
762 },
763 ],
764 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
765 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
766 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
767 &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.
768 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
769 },
770 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
771 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
772 &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.
773 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800774 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800775 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 }</pre>
778</div>
779
780<div class="method">
781 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
782 <pre>Retrieves the next page of results.
783
784Args:
785 previous_request: The request for the previous page. (required)
786 previous_response: The response from the request for the previous page. (required)
787
788Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 page. Returns None if there are no more items in the collection.
791 </pre>
792</div>
793
794<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 <code class="details" id="patch">patch(projectId, datasetId, modelId, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 <pre>Patch specific fields in the specified model.
797
798Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 projectId: string, Required. Project ID of the model to patch. (required)
800 datasetId: string, Required. Dataset ID of the model to patch. (required)
801 modelId: string, Required. Model ID of the model to patch. (required)
802 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 The object takes the form of:
804
805{
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800806 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
807 { # Information about a single training query run for the model.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800808 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
809 { # Information about a single iteration of the training run.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800810 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
811 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
812 &quot;index&quot;: 42, # Index of the iteration, 0 based.
813 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800814 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800815 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
816 &quot;A String&quot;,
817 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800818 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
819 { # Arima model information.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800820 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
821 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
822 &quot;A String&quot;,
823 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800824 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800825 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
826 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
827 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
828 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
829 },
830 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
831 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
832 3.14,
833 ],
834 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
835 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
836 3.14,
837 ],
838 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800839 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
840 &quot;variance&quot;: 3.14, # Variance.
841 &quot;aic&quot;: 3.14, # AIC.
842 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
843 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800844 },
845 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800846 },
847 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
848 { # Information about a single cluster for clustering model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800849 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800850 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
851 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800852 },
853 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800854 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800855 },
856 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800857 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800858 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models. # The evaluation metrics over training/eval data that were computed at the end of training.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800859 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800860 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800861 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
862 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800863 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
864 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
865 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
866 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800867 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
868 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800869 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
870 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
871 { # Confusion matrix for binary classification models.
872 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
873 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
874 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
875 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
876 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
877 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
878 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
879 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
880 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
881 },
882 ],
883 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
884 },
885 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800886 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
887 { # Confusion matrix for multi-class classification models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800888 &quot;rows&quot;: [ # One row per actual label.
889 { # A single row in the confusion matrix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800890 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800891 &quot;entries&quot;: [ # Info describing predicted label distribution.
892 { # A single entry in the confusion matrix.
893 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
894 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will also add an entry indicating the number of items under the confidence threshold.
895 },
896 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800897 },
898 ],
899 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
900 },
901 ],
902 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
903 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
904 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
905 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
906 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
907 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
908 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
909 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
910 },
911 },
912 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
913 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
914 { # Message containing the information about one cluster.
915 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
916 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
917 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
918 { # Representative value of a single feature within the cluster.
919 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
920 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
921 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
922 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category &quot;_OTHER_&quot; and count as aggregate counts of remaining categories.
923 { # Represents the count of a single category within the cluster.
924 &quot;category&quot;: &quot;A String&quot;, # The name of category.
925 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
926 },
927 ],
928 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800929 },
930 ],
931 },
932 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800933 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
934 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800935 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800936 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
937 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
938 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
939 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
940 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
941 },
942 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models.
943 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
944 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
945 &quot;rSquared&quot;: 3.14, # R^2 score.
946 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
947 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800948 },
949 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800950 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
951 True or False,
952 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800953 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
954 &quot;A String&quot;,
955 ],
956 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
957 &quot;A String&quot;,
958 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800959 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
960 { # ARIMA model fitting metrics.
961 &quot;variance&quot;: 3.14, # Variance.
962 &quot;aic&quot;: 3.14, # AIC.
963 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
964 },
965 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800966 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
967 { # Arima order, can be used for both non-seasonal and seasonal parts.
968 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
969 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
970 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
971 },
972 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800973 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
974 { # Model evaluation metrics for a single ARIMA forecasting model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800975 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
976 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
977 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
978 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
979 },
980 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800981 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800982 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
983 &quot;A String&quot;,
984 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800985 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
986 &quot;variance&quot;: 3.14, # Variance.
987 &quot;aic&quot;: 3.14, # AIC.
988 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
989 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800990 },
991 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800992 },
993 },
994 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation data tables that were used to train the model. # Data split result of the training run. Only set when the input data is actually split.
995 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
996 &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.
997 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
998 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
999 },
1000 &quot;trainingTable&quot;: { # Table reference of the training data after split.
1001 &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.
1002 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1003 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1004 },
1005 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001006 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
1007 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
1008 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
1009 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
1010 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
1011 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
1012 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
1013 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
1014 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
1015 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
1016 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
1017 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
1018 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
1019 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
1020 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
1021 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is less than &#x27;min_relative_progress&#x27;. Used only for iterative training algorithms.
1022 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
1023 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1024 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1025 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001027 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
1028 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
1029 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
1030 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
1031 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
1032 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
1033 &quot;A String&quot;,
1034 ],
1035 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
1036 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
1037 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
1038 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
1039 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
1040 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
1041 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
1042 &quot;A String&quot;,
1043 ],
1044 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
1045 &quot;holidayRegion&quot;: &quot;A String&quot;, # The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
1046 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
1047 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
1048 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
1049 &quot;a_key&quot;: 3.14,
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001050 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001051 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
1052 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
1053 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
1054 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
1055 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
1056 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
1057 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
1058 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
1059 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001060 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001061 &quot;globalExplanations&quot;: [ # Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
1062 { # Global explanations containing the top most important features after training.
1063 &quot;explanations&quot;: [ # A list of the top global explanations. Sorted by absolute value of attribution in descending order.
1064 { # Explanation for a single feature.
1065 &quot;attribution&quot;: 3.14, # Attribution of feature.
1066 &quot;featureName&quot;: &quot;A String&quot;, # Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
1067 },
1068 ],
1069 &quot;classLabel&quot;: &quot;A String&quot;, # Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
1070 },
1071 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001072 },
1073 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001074 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001075 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
1076 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
1077 &quot;a_key&quot;: &quot;A String&quot;,
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001078 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001079 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001080 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
1081 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
1082 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
1083 { # A field or a column.
1084 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1085 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
1086 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
1087 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1088 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1089 &quot;fields&quot;: [
1090 # Object with schema name: StandardSqlField
1091 ],
1092 },
1093 },
1094 },
1095 ],
1096 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model. The output of the model will have a &quot;predicted_&quot; prefix to these columns.
1097 { # A field or a column.
1098 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1099 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
1100 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
1101 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1102 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1103 &quot;fields&quot;: [
1104 # Object with schema name: StandardSqlField
1105 ],
1106 },
1107 },
1108 },
1109 ],
1110 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
1111 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
1112 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1113 &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.
1114 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
1115 },
1116 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
1117 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
1118 &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.
1119 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001120 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
1121 }
1122
1123
1124Returns:
1125 An object of the form:
1126
1127 {
1128 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
1129 { # Information about a single training query run for the model.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001130 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
1131 { # Information about a single iteration of the training run.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001132 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
1133 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
1134 &quot;index&quot;: 42, # Index of the iteration, 0 based.
1135 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001136 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001137 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1138 &quot;A String&quot;,
1139 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001140 &quot;arimaModelInfo&quot;: [ # This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
1141 { # Arima model information.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001142 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
1143 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1144 &quot;A String&quot;,
1145 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001146 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001147 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
1148 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1149 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1150 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1151 },
1152 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
1153 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
1154 3.14,
1155 ],
1156 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
1157 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
1158 3.14,
1159 ],
1160 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001161 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
1162 &quot;variance&quot;: 3.14, # Variance.
1163 &quot;aic&quot;: 3.14, # AIC.
1164 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1165 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001166 },
1167 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001168 },
1169 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
1170 { # Information about a single cluster for clustering model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001171 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001172 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
1173 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001174 },
1175 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001176 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001177 },
1178 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001179 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001180 &quot;evaluationMetrics&quot;: { # Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models. # The evaluation metrics over training/eval data that were computed at the end of training.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001181 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001182 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001183 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
1184 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001185 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
1186 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1187 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
1188 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001189 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
1190 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001191 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
1192 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
1193 { # Confusion matrix for binary classification models.
1194 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
1195 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
1196 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
1197 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
1198 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
1199 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
1200 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
1201 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
1202 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
1203 },
1204 ],
1205 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
1206 },
1207 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001208 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
1209 { # Confusion matrix for multi-class classification models.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001210 &quot;rows&quot;: [ # One row per actual label.
1211 { # A single row in the confusion matrix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001212 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001213 &quot;entries&quot;: [ # Info describing predicted label distribution.
1214 { # A single entry in the confusion matrix.
1215 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
1216 &quot;predictedLabel&quot;: &quot;A String&quot;, # The predicted label. For confidence_threshold &gt; 0, we will also add an entry indicating the number of items under the confidence threshold.
1217 },
1218 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001219 },
1220 ],
1221 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
1222 },
1223 ],
1224 &quot;aggregateClassificationMetrics&quot;: { # Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows. # Aggregate classification metrics.
1225 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
1226 &quot;threshold&quot;: 3.14, # Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
1227 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
1228 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1229 &quot;precision&quot;: 3.14, # Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
1230 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
1231 &quot;recall&quot;: 3.14, # Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
1232 },
1233 },
1234 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
1235 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
1236 { # Message containing the information about one cluster.
1237 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
1238 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
1239 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
1240 { # Representative value of a single feature within the cluster.
1241 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
1242 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
1243 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
1244 &quot;categoryCounts&quot;: [ # Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category &quot;_OTHER_&quot; and count as aggregate counts of remaining categories.
1245 { # Represents the count of a single category within the cluster.
1246 &quot;category&quot;: &quot;A String&quot;, # The name of category.
1247 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
1248 },
1249 ],
1250 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001251 },
1252 ],
1253 },
1254 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001255 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
1256 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001257 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001258 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
1259 &quot;meanAveragePrecision&quot;: 3.14, # Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
1260 &quot;normalizedDiscountedCumulativeGain&quot;: 3.14, # A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
1261 &quot;averageRank&quot;: 3.14, # Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
1262 &quot;meanSquaredError&quot;: 3.14, # Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
1263 },
1264 &quot;regressionMetrics&quot;: { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models.
1265 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
1266 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
1267 &quot;rSquared&quot;: 3.14, # R^2 score.
1268 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
1269 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001270 },
1271 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001272 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
1273 True or False,
1274 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001275 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
1276 &quot;A String&quot;,
1277 ],
1278 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1279 &quot;A String&quot;,
1280 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001281 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
1282 { # ARIMA model fitting metrics.
1283 &quot;variance&quot;: 3.14, # Variance.
1284 &quot;aic&quot;: 3.14, # AIC.
1285 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1286 },
1287 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001288 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
1289 { # Arima order, can be used for both non-seasonal and seasonal parts.
1290 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1291 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1292 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1293 },
1294 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001295 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
1296 { # Model evaluation metrics for a single ARIMA forecasting model.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001297 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
1298 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1299 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1300 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1301 },
1302 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001303 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001304 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1305 &quot;A String&quot;,
1306 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001307 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
1308 &quot;variance&quot;: 3.14, # Variance.
1309 &quot;aic&quot;: 3.14, # AIC.
1310 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1311 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001312 },
1313 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001314 },
1315 },
1316 &quot;dataSplitResult&quot;: { # Data split result. This contains references to the training and evaluation data tables that were used to train the model. # Data split result of the training run. Only set when the input data is actually split.
1317 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
1318 &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.
1319 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1320 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1321 },
1322 &quot;trainingTable&quot;: { # Table reference of the training data after split.
1323 &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.
1324 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1325 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1326 },
1327 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001328 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
1329 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
1330 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
1331 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
1332 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
1333 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
1334 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
1335 &quot;dataSplitEvalFraction&quot;: 3.14, # The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
1336 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
1337 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
1338 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
1339 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
1340 &quot;preserveInputStructs&quot;: True or False, # Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
1341 &quot;earlyStop&quot;: True or False, # Whether to stop early when the loss doesn&#x27;t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
1342 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
1343 &quot;minRelativeProgress&quot;: 3.14, # When early_stop is true, stops training when accuracy improvement is less than &#x27;min_relative_progress&#x27;. Used only for iterative training algorithms.
1344 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
1345 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1346 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1347 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001348 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001349 &quot;dataSplitColumn&quot;: &quot;A String&quot;, # The column to split data with. This column won&#x27;t be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
1350 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
1351 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
1352 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
1353 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
1354 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
1355 &quot;A String&quot;,
1356 ],
1357 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
1358 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
1359 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
1360 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
1361 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
1362 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
1363 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
1364 &quot;A String&quot;,
1365 ],
1366 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
1367 &quot;holidayRegion&quot;: &quot;A String&quot;, # The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
1368 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
1369 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
1370 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
1371 &quot;a_key&quot;: 3.14,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001372 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001373 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
1374 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
1375 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
1376 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
1377 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
1378 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
1379 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
1380 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
1381 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001382 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001383 &quot;globalExplanations&quot;: [ # Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
1384 { # Global explanations containing the top most important features after training.
1385 &quot;explanations&quot;: [ # A list of the top global explanations. Sorted by absolute value of attribution in descending order.
1386 { # Explanation for a single feature.
1387 &quot;attribution&quot;: 3.14, # Attribution of feature.
1388 &quot;featureName&quot;: &quot;A String&quot;, # Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
1389 },
1390 ],
1391 &quot;classLabel&quot;: &quot;A String&quot;, # Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
1392 },
1393 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001394 },
1395 ],
1396 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001397 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
1398 &quot;labels&quot;: { # The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
1399 &quot;a_key&quot;: &quot;A String&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001400 },
1401 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001402 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
1403 &quot;expirationTime&quot;: &quot;A String&quot;, # Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
1404 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
1405 { # A field or a column.
1406 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1407 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
1408 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
1409 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1410 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1411 &quot;fields&quot;: [
1412 # Object with schema name: StandardSqlField
1413 ],
1414 },
1415 },
1416 },
1417 ],
1418 &quot;labelColumns&quot;: [ # Output only. Label columns that were used to train this model. The output of the model will have a &quot;predicted_&quot; prefix to these columns.
1419 { # A field or a column.
1420 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1421 &quot;type&quot;: { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=&quot;INT64&quot;} ARRAY: {type_kind=&quot;ARRAY&quot;, array_element_type=&quot;STRING&quot;} STRUCT&gt;: {type_kind=&quot;STRUCT&quot;, struct_type={fields=[ {name=&quot;x&quot;, type={type_kind=&quot;STRING&quot;}}, {name=&quot;y&quot;, type={type_kind=&quot;ARRAY&quot;, array_element_type=&quot;DATE&quot;}} ]}} # Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this &quot;type&quot; field).
1422 &quot;typeKind&quot;: &quot;A String&quot;, # Required. The top level type of this field. Can be any standard SQL data type (e.g., &quot;INT64&quot;, &quot;DATE&quot;, &quot;ARRAY&quot;).
1423 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1424 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1425 &quot;fields&quot;: [
1426 # Object with schema name: StandardSqlField
1427 ],
1428 },
1429 },
1430 },
1431 ],
1432 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
1433 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
1434 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1435 &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.
1436 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
1437 },
1438 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
1439 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
1440 &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.
1441 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001442 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
1443 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444</div>
1445
1446</body></html>