blob: c8fbee82e6bb4ae76caa0306ba057a58de7dfa55 [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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=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 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125 &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.
126 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
127 { # A field or a column.
128 &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).
129 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
130 &quot;fields&quot;: [
131 # Object with schema name: StandardSqlField
132 ],
133 },
134 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
135 &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;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700137 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 ],
140 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
141 &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.
142 { # A field or a column.
143 &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).
144 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
145 &quot;fields&quot;: [
146 # Object with schema name: StandardSqlField
147 ],
148 },
149 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
150 &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;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700152 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154 ],
155 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
156 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
157 &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.
158 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700160 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
161 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
162 &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.
163 &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.
164 },
165 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
166 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
167 &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.
168 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
169 },
170 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
171 { # Information about a single training query run for the model.
172 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
173 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
174 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
175 &quot;A String&quot;,
176 ],
177 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
178 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
179 &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.
180 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
181 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
182 &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.
183 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
184 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
185 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
186 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
187 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
188 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
189 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
190 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
191 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
192 &quot;A String&quot;,
193 ],
194 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
195 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
196 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
197 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
198 &quot;a_key&quot;: 3.14,
199 },
200 &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.
201 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
202 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
203 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
204 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
205 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
206 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
207 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
208 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
209 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
210 &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.
211 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
212 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
213 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
214 },
215 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
216 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
217 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
218 &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.
219 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
220 &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.
221 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
222 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
223 &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
224 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
225 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
226 },
227 &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.
228 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
229 &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.
230 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
231 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
232 },
233 &quot;trainingTable&quot;: { # Table reference of the training data after split.
234 &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.
235 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
236 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
237 },
238 },
239 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
240 { # Information about a single iteration of the training run.
241 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
242 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
243 &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.
244 { # Arima model information.
245 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
246 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
247 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
248 3.14,
249 ],
250 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
251 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
252 3.14,
253 ],
254 },
255 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
256 &quot;variance&quot;: 3.14, # Variance.
257 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
258 &quot;aic&quot;: 3.14, # AIC.
259 },
260 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
261 &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700263 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
264 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
265 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
266 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
267 },
268 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700269 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700270 ],
271 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
272 &quot;A String&quot;,
273 ],
274 },
275 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
276 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
277 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
278 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
279 { # Information about a single cluster for clustering model.
280 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
281 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
282 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
283 },
284 ],
285 &quot;index&quot;: 42, # Index of the iteration, 0 based.
286 },
287 ],
288 &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.
289 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
290 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
291 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
292 { # Confusion matrix for binary classification models.
293 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
294 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
295 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
296 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
297 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
298 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
299 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
300 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
301 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
302 },
303 ],
304 &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.
305 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
306 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
307 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
308 &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.
309 &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.
310 &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.
311 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
312 },
313 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
314 },
315 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
316 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
317 { # Message containing the information about one cluster.
318 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
319 { # Representative value of a single feature within the cluster.
320 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
321 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
322 &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.
323 { # Represents the count of a single category within the cluster.
324 &quot;category&quot;: &quot;A String&quot;, # The name of category.
325 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
326 },
327 ],
328 },
329 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
330 },
331 ],
332 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
333 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
334 },
335 ],
336 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
337 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
338 },
339 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
340 &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.
341 &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.
342 &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.
343 &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.
344 },
345 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
346 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
347 &quot;A String&quot;,
348 ],
349 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
350 { # Model evaluation metrics for a single ARIMA forecasting model.
351 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
352 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
353 &quot;variance&quot;: 3.14, # Variance.
354 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
355 &quot;aic&quot;: 3.14, # AIC.
356 },
357 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
358 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
363 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700364 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
365 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 },
367 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700368 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
369 { # ARIMA model fitting metrics.
370 &quot;variance&quot;: 3.14, # Variance.
371 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
372 &quot;aic&quot;: 3.14, # AIC.
373 },
374 ],
375 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
379 { # Arima order, can be used for both non-seasonal and seasonal parts.
380 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
381 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
382 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
383 },
384 ],
385 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
386 True or False,
387 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700389 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
390 &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.
391 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
392 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
393 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
394 &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.
395 &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.
396 &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.
397 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700398 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700399 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
400 { # Confusion matrix for multi-class classification models.
401 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
402 &quot;rows&quot;: [ # One row per actual label.
403 { # A single row in the confusion matrix.
404 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
405 &quot;entries&quot;: [ # Info describing predicted label distribution.
406 { # A single entry in the confusion matrix.
407 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
408 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 },
410 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700412 ],
413 },
414 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700415 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700416 &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.
417 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
418 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
419 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
420 &quot;rSquared&quot;: 3.14, # R^2 score.
421 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
422 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700423 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700424 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700426 ],
427 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
428 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
429 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430</div>
431
432<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700433 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700434 <pre>Lists all models in the specified dataset. Requires the READER dataset role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435
436Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 projectId: string, Required. Project ID of the models to list. (required)
438 datasetId: string, Required. Dataset ID of the models to list. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700439 pageToken: string, Page token, returned by a previous call to request the next page of results
440 maxResults: integer, The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441
442Returns:
443 An object of the form:
444
445 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700446 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700448 &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.
449 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
450 { # A field or a column.
451 &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).
452 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
453 &quot;fields&quot;: [
454 # Object with schema name: StandardSqlField
455 ],
456 },
457 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
458 &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;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700460 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700462 ],
463 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
464 &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.
465 { # A field or a column.
466 &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).
467 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
468 &quot;fields&quot;: [
469 # Object with schema name: StandardSqlField
470 ],
471 },
472 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
473 &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;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700474 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700475 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700477 ],
478 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
479 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
480 &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.
481 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700483 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
484 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
485 &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.
486 &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.
487 },
488 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
489 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
490 &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.
491 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
492 },
493 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
494 { # Information about a single training query run for the model.
495 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
496 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
497 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
498 &quot;A String&quot;,
499 ],
500 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
501 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
502 &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.
503 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
504 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
505 &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.
506 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
507 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
508 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
509 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
510 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
511 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
512 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
513 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
514 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
515 &quot;A String&quot;,
516 ],
517 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
518 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
519 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
520 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
521 &quot;a_key&quot;: 3.14,
522 },
523 &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.
524 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
525 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
526 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
527 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
528 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
529 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
530 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
531 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
532 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
533 &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.
534 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
535 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
536 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
537 },
538 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
539 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
540 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
541 &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.
542 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
543 &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.
544 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
545 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
546 &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
547 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
548 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
549 },
550 &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.
551 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
552 &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.
553 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
554 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
555 },
556 &quot;trainingTable&quot;: { # Table reference of the training data after split.
557 &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.
558 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
559 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
560 },
561 },
562 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
563 { # Information about a single iteration of the training run.
564 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
565 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
566 &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.
567 { # Arima model information.
568 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
569 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
570 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
571 3.14,
572 ],
573 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
574 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
575 3.14,
576 ],
577 },
578 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
579 &quot;variance&quot;: 3.14, # Variance.
580 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
581 &quot;aic&quot;: 3.14, # AIC.
582 },
583 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
584 &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700585 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700586 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
587 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
588 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
589 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
590 },
591 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700592 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700593 ],
594 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
595 &quot;A String&quot;,
596 ],
597 },
598 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
599 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
600 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
601 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
602 { # Information about a single cluster for clustering model.
603 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
604 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
605 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
606 },
607 ],
608 &quot;index&quot;: 42, # Index of the iteration, 0 based.
609 },
610 ],
611 &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.
612 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
613 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
614 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
615 { # Confusion matrix for binary classification models.
616 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
617 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
618 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
619 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
620 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
621 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
622 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
623 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
624 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
625 },
626 ],
627 &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.
628 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
629 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
630 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
631 &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.
632 &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.
633 &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.
634 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
635 },
636 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
637 },
638 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
639 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
640 { # Message containing the information about one cluster.
641 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
642 { # Representative value of a single feature within the cluster.
643 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
644 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
645 &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.
646 { # Represents the count of a single category within the cluster.
647 &quot;category&quot;: &quot;A String&quot;, # The name of category.
648 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
649 },
650 ],
651 },
652 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
653 },
654 ],
655 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
656 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
657 },
658 ],
659 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
660 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
661 },
662 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
663 &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.
664 &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.
665 &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.
666 &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.
667 },
668 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
669 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
670 &quot;A String&quot;,
671 ],
672 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
673 { # Model evaluation metrics for a single ARIMA forecasting model.
674 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
675 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
676 &quot;variance&quot;: 3.14, # Variance.
677 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
678 &quot;aic&quot;: 3.14, # AIC.
679 },
680 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
681 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
686 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700687 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
688 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 },
690 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700691 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
692 { # ARIMA model fitting metrics.
693 &quot;variance&quot;: 3.14, # Variance.
694 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
695 &quot;aic&quot;: 3.14, # AIC.
696 },
697 ],
698 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700701 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
702 { # Arima order, can be used for both non-seasonal and seasonal parts.
703 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
704 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
705 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
706 },
707 ],
708 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
709 True or False,
710 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700712 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
713 &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.
714 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
715 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
716 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
717 &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.
718 &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.
719 &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.
720 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700721 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700722 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
723 { # Confusion matrix for multi-class classification models.
724 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
725 &quot;rows&quot;: [ # One row per actual label.
726 { # A single row in the confusion matrix.
727 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
728 &quot;entries&quot;: [ # Info describing predicted label distribution.
729 { # A single entry in the confusion matrix.
730 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
731 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 },
733 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700735 ],
736 },
737 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700738 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700739 &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.
740 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
741 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
742 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
743 &quot;rSquared&quot;: 3.14, # R^2 score.
744 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
745 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700746 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700747 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700749 ],
750 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
751 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 },
753 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700754 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 }</pre>
756</div>
757
758<div class="method">
759 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
760 <pre>Retrieves the next page of results.
761
762Args:
763 previous_request: The request for the previous page. (required)
764 previous_response: The response from the request for the previous page. (required)
765
766Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 page. Returns None if there are no more items in the collection.
769 </pre>
770</div>
771
772<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700773 <code class="details" id="patch">patch(projectId, datasetId, modelId, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700774 <pre>Patch specific fields in the specified model.
775
776Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 projectId: string, Required. Project ID of the model to patch. (required)
778 datasetId: string, Required. Dataset ID of the model to patch. (required)
779 modelId: string, Required. Model ID of the model to patch. (required)
780 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 The object takes the form of:
782
783{
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700784 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
786 { # A field or a column.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700787 &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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
789 &quot;fields&quot;: [
790 # Object with schema name: StandardSqlField
791 ],
792 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700793 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700794 &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;).
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700796 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 },
798 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700799 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
800 &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.
801 { # A field or a column.
802 &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).
803 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
804 &quot;fields&quot;: [
805 # Object with schema name: StandardSqlField
806 ],
807 },
808 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
809 &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;).
810 },
811 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
812 },
813 ],
814 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
815 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
816 &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.
817 &quot;a_key&quot;: &quot;A String&quot;,
818 },
819 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
820 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
821 &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.
822 &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.
823 },
824 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
825 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
826 &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.
827 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
828 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 { # Information about a single training query run for the model.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700831 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
832 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
833 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
834 &quot;A String&quot;,
835 ],
836 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
837 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
838 &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.
839 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
840 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
841 &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.
842 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
843 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
844 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
845 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
846 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
847 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
848 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
849 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
850 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
851 &quot;A String&quot;,
852 ],
853 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
854 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
855 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
856 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
857 &quot;a_key&quot;: 3.14,
858 },
859 &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.
860 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
861 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
862 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
863 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
864 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
865 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
866 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
867 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
868 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
869 &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.
870 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
871 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
872 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
873 },
874 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
875 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
876 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
877 &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.
878 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
879 &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.
880 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
881 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
882 &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
883 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
884 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
885 },
886 &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.
887 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
888 &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.
889 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
890 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
891 },
892 &quot;trainingTable&quot;: { # Table reference of the training data after split.
893 &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.
894 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
895 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
896 },
897 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
899 { # Information about a single iteration of the training run.
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700901 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
902 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 { # Arima model information.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700904 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700905 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700906 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
907 3.14,
908 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700909 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
910 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
911 3.14,
912 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700913 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700914 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
915 &quot;variance&quot;: 3.14, # Variance.
916 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
917 &quot;aic&quot;: 3.14, # AIC.
918 },
919 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 &quot;A String&quot;,
921 ],
922 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
924 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700925 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
926 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700927 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 },
929 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700930 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
Bu Sun Kim65020912020-05-20 12:08:20 -0700931 &quot;A String&quot;,
932 ],
933 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700934 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
935 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
936 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700937 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
938 { # Information about a single cluster for clustering model.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700939 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700940 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700941 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700942 },
943 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700944 &quot;index&quot;: 42, # Index of the iteration, 0 based.
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 },
946 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700947 &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.
948 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
949 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
950 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
951 { # Confusion matrix for binary classification models.
952 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
953 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
954 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
955 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
956 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
957 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
958 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
959 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
960 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 },
962 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700963 &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.
964 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
965 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
966 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
967 &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.
968 &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.
969 &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.
970 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
971 },
972 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 },
974 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 { # Message containing the information about one cluster.
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 { # Representative value of a single feature within the cluster.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
980 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700981 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700982 { # Represents the count of a single category within the cluster.
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;category&quot;: &quot;A String&quot;, # The name of category.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700984 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
Dan O'Mearadd494642020-05-01 07:42:23 -0700985 },
986 ],
987 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700988 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
989 },
990 ],
991 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
992 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
993 },
994 ],
995 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
996 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
997 },
998 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
999 &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.
1000 &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.
1001 &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.
1002 &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.
1003 },
1004 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
1005 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
1006 &quot;A String&quot;,
1007 ],
1008 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
1009 { # Model evaluation metrics for a single ARIMA forecasting model.
1010 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
1011 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
1012 &quot;variance&quot;: 3.14, # Variance.
1013 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1014 &quot;aic&quot;: 3.14, # AIC.
1015 },
1016 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
1017 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1018 &quot;A String&quot;,
1019 ],
1020 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
1021 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1022 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1023 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1024 },
1025 },
1026 ],
1027 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
1028 { # ARIMA model fitting metrics.
1029 &quot;variance&quot;: 3.14, # Variance.
1030 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1031 &quot;aic&quot;: 3.14, # AIC.
1032 },
1033 ],
1034 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1035 &quot;A String&quot;,
1036 ],
1037 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
1038 { # Arima order, can be used for both non-seasonal and seasonal parts.
1039 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1040 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1041 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1042 },
1043 ],
1044 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
1045 True or False,
1046 ],
1047 },
1048 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
1049 &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.
1050 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
1051 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
1052 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
1053 &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.
1054 &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.
1055 &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.
1056 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1057 },
1058 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
1059 { # Confusion matrix for multi-class classification models.
1060 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
1061 &quot;rows&quot;: [ # One row per actual label.
1062 { # A single row in the confusion matrix.
1063 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
1064 &quot;entries&quot;: [ # Info describing predicted label distribution.
1065 { # A single entry in the confusion matrix.
1066 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
1067 &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.
1068 },
1069 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001070 },
1071 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 },
1073 ],
1074 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001075 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001076 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001077 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001078 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001079 &quot;rSquared&quot;: 3.14, # R^2 score.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001080 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001081 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001083 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 },
1085 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001086 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001087 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001088 }
1089
1090
1091Returns:
1092 An object of the form:
1093
1094 {
1095 &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.
1096 &quot;featureColumns&quot;: [ # Output only. Input feature columns that were used to train this model.
1097 { # A field or a column.
1098 &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).
1099 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1100 &quot;fields&quot;: [
1101 # Object with schema name: StandardSqlField
1102 ],
1103 },
1104 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1105 &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;).
1106 },
1107 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1108 },
1109 ],
1110 &quot;etag&quot;: &quot;A String&quot;, # Output only. A hash of this resource.
1111 &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.
1112 { # A field or a column.
1113 &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).
1114 &quot;structType&quot;: { # The fields of this struct, in order, if type_kind = &quot;STRUCT&quot;.
1115 &quot;fields&quot;: [
1116 # Object with schema name: StandardSqlField
1117 ],
1118 },
1119 &quot;arrayElementType&quot;: # Object with schema name: StandardSqlDataType # The type of the array&#x27;s elements, if type_kind = &quot;ARRAY&quot;.
1120 &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;).
1121 },
1122 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of this field. Can be absent for struct fields.
1123 },
1124 ],
1125 &quot;modelType&quot;: &quot;A String&quot;, # Output only. Type of the model resource.
1126 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-friendly description of this model.
1127 &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.
1128 &quot;a_key&quot;: &quot;A String&quot;,
1129 },
1130 &quot;creationTime&quot;: &quot;A String&quot;, # Output only. The time when this model was created, in millisecs since the epoch.
1131 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # Output only. The time when this model was last modified, in millisecs since the epoch.
1132 &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.
1133 &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.
1134 },
1135 &quot;modelReference&quot;: { # Required. Unique identifier for this model.
1136 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1137 &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.
1138 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
1139 },
1140 &quot;trainingRuns&quot;: [ # Output only. Information for all training runs in increasing order of start_time.
1141 { # Information about a single training query run for the model.
1142 &quot;trainingOptions&quot;: { # Options that were used for this training run, includes user specified and default options that were used.
1143 &quot;numClusters&quot;: &quot;A String&quot;, # Number of clusters for clustering models.
1144 &quot;hiddenUnits&quot;: [ # Hidden units for dnn models.
1145 &quot;A String&quot;,
1146 ],
1147 &quot;kmeansInitializationMethod&quot;: &quot;A String&quot;, # The method used to initialize the centroids for kmeans algorithm.
1148 &quot;batchSize&quot;: &quot;A String&quot;, # Batch size for dnn models.
1149 &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.
1150 &quot;l2Regularization&quot;: 3.14, # L2 regularization coefficient.
1151 &quot;horizon&quot;: &quot;A String&quot;, # The number of periods ahead that need to be forecasted.
1152 &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.
1153 &quot;modelUri&quot;: &quot;A String&quot;, # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
1154 &quot;learnRateStrategy&quot;: &quot;A String&quot;, # The strategy to determine learn rate for the current iteration.
1155 &quot;warmStart&quot;: True or False, # Whether to train a model from the last checkpoint.
1156 &quot;maxTreeDepth&quot;: &quot;A String&quot;, # Maximum depth of a tree for boosted tree models.
1157 &quot;timeSeriesDataColumn&quot;: &quot;A String&quot;, # Column to be designated as time series data for ARIMA model.
1158 &quot;timeSeriesIdColumn&quot;: &quot;A String&quot;, # The id column that will be used to indicate different time series to forecast in parallel.
1159 &quot;minSplitLoss&quot;: 3.14, # Minimum split loss for boosted tree models.
1160 &quot;autoArimaMaxOrder&quot;: &quot;A String&quot;, # The max value of non-seasonal p and q.
1161 &quot;inputLabelColumns&quot;: [ # Name of input label columns in training data.
1162 &quot;A String&quot;,
1163 ],
1164 &quot;lossType&quot;: &quot;A String&quot;, # Type of loss function used during training run.
1165 &quot;dataSplitMethod&quot;: &quot;A String&quot;, # The data split type for training and evaluation, e.g. RANDOM.
1166 &quot;optimizationStrategy&quot;: &quot;A String&quot;, # Optimization strategy for training linear regression models.
1167 &quot;labelClassWeights&quot;: { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
1168 &quot;a_key&quot;: 3.14,
1169 },
1170 &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.
1171 &quot;itemColumn&quot;: &quot;A String&quot;, # Item column specified for matrix factorization models.
1172 &quot;autoArima&quot;: True or False, # Whether to enable auto ARIMA or not.
1173 &quot;timeSeriesTimestampColumn&quot;: &quot;A String&quot;, # Column to be designated as time series timestamp for ARIMA model.
1174 &quot;userColumn&quot;: &quot;A String&quot;, # User column specified for matrix factorization models.
1175 &quot;initialLearnRate&quot;: 3.14, # Specifies the initial learning rate for the line search learn rate strategy.
1176 &quot;subsample&quot;: 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
1177 &quot;dataFrequency&quot;: &quot;A String&quot;, # The data frequency of a time series.
1178 &quot;walsAlpha&quot;: 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified.
1179 &quot;dropout&quot;: 3.14, # Dropout probability for dnn models.
1180 &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.
1181 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1182 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1183 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1184 },
1185 &quot;learnRate&quot;: 3.14, # Learning rate in training. Used only for iterative training algorithms.
1186 &quot;feedbackType&quot;: &quot;A String&quot;, # Feedback type that specifies which algorithm to run for matrix factorization.
1187 &quot;maxIterations&quot;: &quot;A String&quot;, # The maximum number of iterations in training. Used only for iterative training algorithms.
1188 &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.
1189 &quot;kmeansInitializationColumn&quot;: &quot;A String&quot;, # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
1190 &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.
1191 &quot;numFactors&quot;: &quot;A String&quot;, # Num factors specified for matrix factorization models.
1192 &quot;distanceType&quot;: &quot;A String&quot;, # Distance type for clustering models.
1193 &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
1194 &quot;includeDrift&quot;: True or False, # Include drift when fitting an ARIMA model.
1195 &quot;l1Regularization&quot;: 3.14, # L1 regularization coefficient.
1196 },
1197 &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.
1198 &quot;evaluationTable&quot;: { # Table reference of the evaluation data after split.
1199 &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.
1200 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1201 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1202 },
1203 &quot;trainingTable&quot;: { # Table reference of the training data after split.
1204 &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.
1205 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1206 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1207 },
1208 },
1209 &quot;results&quot;: [ # Output of each iteration run, results.size() &lt;= max_iterations.
1210 { # Information about a single iteration of the training run.
1211 &quot;learnRate&quot;: 3.14, # Learn rate used for this iteration.
1212 &quot;arimaResult&quot;: { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
1213 &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.
1214 { # Arima model information.
1215 &quot;hasDrift&quot;: True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1.
1216 &quot;arimaCoefficients&quot;: { # Arima coefficients. # Arima coefficients.
1217 &quot;movingAverageCoefficients&quot;: [ # Moving-average coefficients, an array of double.
1218 3.14,
1219 ],
1220 &quot;interceptCoefficient&quot;: 3.14, # Intercept coefficient, just a double not an array.
1221 &quot;autoRegressiveCoefficients&quot;: [ # Auto-regressive coefficients, an array of double.
1222 3.14,
1223 ],
1224 },
1225 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
1226 &quot;variance&quot;: 3.14, # Variance.
1227 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1228 &quot;aic&quot;: 3.14, # AIC.
1229 },
1230 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1231 &quot;A String&quot;,
1232 ],
1233 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
1234 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1235 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1236 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1237 },
1238 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
1239 },
1240 ],
1241 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1242 &quot;A String&quot;,
1243 ],
1244 },
1245 &quot;durationMs&quot;: &quot;A String&quot;, # Time taken to run the iteration in milliseconds.
1246 &quot;evalLoss&quot;: 3.14, # Loss computed on the eval data at the end of iteration.
1247 &quot;trainingLoss&quot;: 3.14, # Loss computed on the training data at the end of iteration.
1248 &quot;clusterInfos&quot;: [ # Information about top clusters for clustering models.
1249 { # Information about a single cluster for clustering model.
1250 &quot;clusterRadius&quot;: 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster.
1251 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
1252 &quot;clusterSize&quot;: &quot;A String&quot;, # Cluster size, the total number of points assigned to the cluster.
1253 },
1254 ],
1255 &quot;index&quot;: 42, # Index of the iteration, 0 based.
1256 },
1257 ],
1258 &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.
1259 &quot;binaryClassificationMetrics&quot;: { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models.
1260 &quot;positiveLabel&quot;: &quot;A String&quot;, # Label representing the positive class.
1261 &quot;binaryConfusionMatrixList&quot;: [ # Binary confusion matrix at multiple thresholds.
1262 { # Confusion matrix for binary classification models.
1263 &quot;falseNegatives&quot;: &quot;A String&quot;, # Number of false samples predicted as false.
1264 &quot;f1Score&quot;: 3.14, # The equally weighted average of recall and precision.
1265 &quot;accuracy&quot;: 3.14, # The fraction of predictions given the correct label.
1266 &quot;recall&quot;: 3.14, # The fraction of actual positive labels that were given a positive prediction.
1267 &quot;falsePositives&quot;: &quot;A String&quot;, # Number of false samples predicted as true.
1268 &quot;precision&quot;: 3.14, # The fraction of actual positive predictions that had positive actual labels.
1269 &quot;positiveClassThreshold&quot;: 3.14, # Threshold value used when computing each of the following metric.
1270 &quot;truePositives&quot;: &quot;A String&quot;, # Number of true samples predicted as true.
1271 &quot;trueNegatives&quot;: &quot;A String&quot;, # Number of true samples predicted as false.
1272 },
1273 ],
1274 &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.
1275 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
1276 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
1277 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
1278 &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.
1279 &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.
1280 &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.
1281 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1282 },
1283 &quot;negativeLabel&quot;: &quot;A String&quot;, # Label representing the negative class.
1284 },
1285 &quot;clusteringMetrics&quot;: { # Evaluation metrics for clustering models. # Populated for clustering models.
1286 &quot;clusters&quot;: [ # [Beta] Information for all clusters.
1287 { # Message containing the information about one cluster.
1288 &quot;featureValues&quot;: [ # Values of highly variant features for this cluster.
1289 { # Representative value of a single feature within the cluster.
1290 &quot;featureColumn&quot;: &quot;A String&quot;, # The feature column name.
1291 &quot;categoricalValue&quot;: { # Representative value of a categorical feature. # The categorical feature value.
1292 &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.
1293 { # Represents the count of a single category within the cluster.
1294 &quot;category&quot;: &quot;A String&quot;, # The name of category.
1295 &quot;count&quot;: &quot;A String&quot;, # The count of training samples matching the category within the cluster.
1296 },
1297 ],
1298 },
1299 &quot;numericalValue&quot;: 3.14, # The numerical feature value. This is the centroid value for this feature.
1300 },
1301 ],
1302 &quot;centroidId&quot;: &quot;A String&quot;, # Centroid id.
1303 &quot;count&quot;: &quot;A String&quot;, # Count of training data rows that were assigned to this cluster.
1304 },
1305 ],
1306 &quot;daviesBouldinIndex&quot;: 3.14, # Davies-Bouldin index.
1307 &quot;meanSquaredDistance&quot;: 3.14, # Mean of squared distances between each sample to its cluster centroid.
1308 },
1309 &quot;rankingMetrics&quot;: { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models.
1310 &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.
1311 &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.
1312 &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.
1313 &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.
1314 },
1315 &quot;arimaForecastingMetrics&quot;: { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models.
1316 &quot;timeSeriesId&quot;: [ # Id to differentiate different time series for the large-scale case.
1317 &quot;A String&quot;,
1318 ],
1319 &quot;arimaSingleModelForecastingMetrics&quot;: [ # Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
1320 { # Model evaluation metrics for a single ARIMA forecasting model.
1321 &quot;hasDrift&quot;: True or False, # Is arima model fitted with drift or not. It is always false when d is not 1.
1322 &quot;arimaFittingMetrics&quot;: { # ARIMA model fitting metrics. # Arima fitting metrics.
1323 &quot;variance&quot;: 3.14, # Variance.
1324 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1325 &quot;aic&quot;: 3.14, # AIC.
1326 },
1327 &quot;timeSeriesId&quot;: &quot;A String&quot;, # The id to indicate different time series.
1328 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1329 &quot;A String&quot;,
1330 ],
1331 &quot;nonSeasonalOrder&quot;: { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order.
1332 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1333 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1334 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1335 },
1336 },
1337 ],
1338 &quot;arimaFittingMetrics&quot;: [ # Arima model fitting metrics.
1339 { # ARIMA model fitting metrics.
1340 &quot;variance&quot;: 3.14, # Variance.
1341 &quot;logLikelihood&quot;: 3.14, # Log-likelihood.
1342 &quot;aic&quot;: 3.14, # AIC.
1343 },
1344 ],
1345 &quot;seasonalPeriods&quot;: [ # Seasonal periods. Repeated because multiple periods are supported for one time series.
1346 &quot;A String&quot;,
1347 ],
1348 &quot;nonSeasonalOrder&quot;: [ # Non-seasonal order.
1349 { # Arima order, can be used for both non-seasonal and seasonal parts.
1350 &quot;d&quot;: &quot;A String&quot;, # Order of the differencing part.
1351 &quot;p&quot;: &quot;A String&quot;, # Order of the autoregressive part.
1352 &quot;q&quot;: &quot;A String&quot;, # Order of the moving-average part.
1353 },
1354 ],
1355 &quot;hasDrift&quot;: [ # Whether Arima model fitted with drift or not. It is always false when d is not 1.
1356 True or False,
1357 ],
1358 },
1359 &quot;multiClassClassificationMetrics&quot;: { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models.
1360 &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.
1361 &quot;accuracy&quot;: 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
1362 &quot;f1Score&quot;: 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
1363 &quot;rocAuc&quot;: 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
1364 &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.
1365 &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.
1366 &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.
1367 &quot;logLoss&quot;: 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric.
1368 },
1369 &quot;confusionMatrixList&quot;: [ # Confusion matrix at different thresholds.
1370 { # Confusion matrix for multi-class classification models.
1371 &quot;confidenceThreshold&quot;: 3.14, # Confidence threshold used when computing the entries of the confusion matrix.
1372 &quot;rows&quot;: [ # One row per actual label.
1373 { # A single row in the confusion matrix.
1374 &quot;actualLabel&quot;: &quot;A String&quot;, # The original label of this row.
1375 &quot;entries&quot;: [ # Info describing predicted label distribution.
1376 { # A single entry in the confusion matrix.
1377 &quot;itemCount&quot;: &quot;A String&quot;, # Number of items being predicted as this label.
1378 &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.
1379 },
1380 ],
1381 },
1382 ],
1383 },
1384 ],
1385 },
1386 &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.
1387 &quot;medianAbsoluteError&quot;: 3.14, # Median absolute error.
1388 &quot;meanSquaredError&quot;: 3.14, # Mean squared error.
1389 &quot;meanSquaredLogError&quot;: 3.14, # Mean squared log error.
1390 &quot;rSquared&quot;: 3.14, # R^2 score.
1391 &quot;meanAbsoluteError&quot;: 3.14, # Mean absolute error.
1392 },
1393 },
1394 &quot;startTime&quot;: &quot;A String&quot;, # The start time of this training run.
1395 },
1396 ],
1397 &quot;location&quot;: &quot;A String&quot;, # Output only. The geographic location where the model resides. This value is inherited from the dataset.
1398 &quot;friendlyName&quot;: &quot;A String&quot;, # Optional. A descriptive name for this model.
1399 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400</div>
1401
1402</body></html>