Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 81 | <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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 88 | <p class="firstline">Lists all models in the specified dataset. Requires the READER dataset role.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 89 | <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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(projectId, datasetId, modelId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Patch specific fields in the specified model.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 97 | <code class="details" id="close">close()</code> |
| 98 | <pre>Close httplib2 connections.</pre> |
| 99 | </div> |
| 100 | |
| 101 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 102 | <code class="details" id="delete">delete(projectId, datasetId, modelId)</code> |
| 103 | <pre>Deletes the model specified by modelId from the dataset. |
| 104 | |
| 105 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 106 | 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 109 | </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 | |
| 116 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 120 | |
| 121 | Returns: |
| 122 | An object of the form: |
| 123 | |
| 124 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 125 | "expirationTime": "A String", # 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 | "featureColumns": [ # Output only. Input feature columns that were used to train this model. |
| 127 | { # A field or a column. |
| 128 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 129 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 130 | "fields": [ |
| 131 | # Object with schema name: StandardSqlField |
| 132 | ], |
| 133 | }, |
| 134 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 135 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 136 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 137 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 138 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 139 | ], |
| 140 | "etag": "A String", # Output only. A hash of this resource. |
| 141 | "labelColumns": [ # Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns. |
| 142 | { # A field or a column. |
| 143 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 144 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 145 | "fields": [ |
| 146 | # Object with schema name: StandardSqlField |
| 147 | ], |
| 148 | }, |
| 149 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 150 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 151 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 152 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 153 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 154 | ], |
| 155 | "modelType": "A String", # Output only. Type of the model resource. |
| 156 | "description": "A String", # Optional. A user-friendly description of this model. |
| 157 | "labels": { # 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 | "a_key": "A String", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 159 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 160 | "creationTime": "A String", # Output only. The time when this model was created, in millisecs since the epoch. |
| 161 | "lastModifiedTime": "A String", # Output only. The time when this model was last modified, in millisecs since the epoch. |
| 162 | "encryptionConfiguration": { # 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 | "kmsKeyName": "A String", # [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 | "modelReference": { # Required. Unique identifier for this model. |
| 166 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 167 | "modelId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 169 | }, |
| 170 | "trainingRuns": [ # 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 | "trainingOptions": { # Options that were used for this training run, includes user specified and default options that were used. |
| 173 | "numClusters": "A String", # Number of clusters for clustering models. |
| 174 | "hiddenUnits": [ # Hidden units for dnn models. |
| 175 | "A String", |
| 176 | ], |
| 177 | "kmeansInitializationMethod": "A String", # The method used to initialize the centroids for kmeans algorithm. |
| 178 | "batchSize": "A String", # Batch size for dnn models. |
| 179 | "dataSplitEvalFraction": 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 | "l2Regularization": 3.14, # L2 regularization coefficient. |
| 181 | "horizon": "A String", # The number of periods ahead that need to be forecasted. |
| 182 | "preserveInputStructs": 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 | "modelUri": "A String", # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models. |
| 184 | "learnRateStrategy": "A String", # The strategy to determine learn rate for the current iteration. |
| 185 | "warmStart": True or False, # Whether to train a model from the last checkpoint. |
| 186 | "maxTreeDepth": "A String", # Maximum depth of a tree for boosted tree models. |
| 187 | "timeSeriesDataColumn": "A String", # Column to be designated as time series data for ARIMA model. |
| 188 | "timeSeriesIdColumn": "A String", # The id column that will be used to indicate different time series to forecast in parallel. |
| 189 | "minSplitLoss": 3.14, # Minimum split loss for boosted tree models. |
| 190 | "autoArimaMaxOrder": "A String", # The max value of non-seasonal p and q. |
| 191 | "inputLabelColumns": [ # Name of input label columns in training data. |
| 192 | "A String", |
| 193 | ], |
| 194 | "lossType": "A String", # Type of loss function used during training run. |
| 195 | "dataSplitMethod": "A String", # The data split type for training and evaluation, e.g. RANDOM. |
| 196 | "optimizationStrategy": "A String", # Optimization strategy for training linear regression models. |
| 197 | "labelClassWeights": { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models. |
| 198 | "a_key": 3.14, |
| 199 | }, |
| 200 | "earlyStop": True or False, # Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms. |
| 201 | "itemColumn": "A String", # Item column specified for matrix factorization models. |
| 202 | "autoArima": True or False, # Whether to enable auto ARIMA or not. |
| 203 | "timeSeriesTimestampColumn": "A String", # Column to be designated as time series timestamp for ARIMA model. |
| 204 | "userColumn": "A String", # User column specified for matrix factorization models. |
| 205 | "initialLearnRate": 3.14, # Specifies the initial learning rate for the line search learn rate strategy. |
| 206 | "subsample": 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models. |
| 207 | "dataFrequency": "A String", # The data frequency of a time series. |
| 208 | "walsAlpha": 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified. |
| 209 | "dropout": 3.14, # Dropout probability for dnn models. |
| 210 | "nonSeasonalOrder": { # 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 | "d": "A String", # Order of the differencing part. |
| 212 | "p": "A String", # Order of the autoregressive part. |
| 213 | "q": "A String", # Order of the moving-average part. |
| 214 | }, |
| 215 | "learnRate": 3.14, # Learning rate in training. Used only for iterative training algorithms. |
| 216 | "feedbackType": "A String", # Feedback type that specifies which algorithm to run for matrix factorization. |
| 217 | "maxIterations": "A String", # The maximum number of iterations in training. Used only for iterative training algorithms. |
| 218 | "holidayRegion": "A String", # 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 | "kmeansInitializationColumn": "A String", # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM. |
| 220 | "minRelativeProgress": 3.14, # When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms. |
| 221 | "numFactors": "A String", # Num factors specified for matrix factorization models. |
| 222 | "distanceType": "A String", # Distance type for clustering models. |
| 223 | "dataSplitColumn": "A String", # The column to split data with. This column won'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 | "includeDrift": True or False, # Include drift when fitting an ARIMA model. |
| 225 | "l1Regularization": 3.14, # L1 regularization coefficient. |
| 226 | }, |
| 227 | "dataSplitResult": { # 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 | "evaluationTable": { # Table reference of the evaluation data after split. |
| 229 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 231 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 232 | }, |
| 233 | "trainingTable": { # Table reference of the training data after split. |
| 234 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 236 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 237 | }, |
| 238 | }, |
| 239 | "results": [ # Output of each iteration run, results.size() <= max_iterations. |
| 240 | { # Information about a single iteration of the training run. |
| 241 | "learnRate": 3.14, # Learn rate used for this iteration. |
| 242 | "arimaResult": { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results. |
| 243 | "arimaModelInfo": [ # 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 | "hasDrift": True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 246 | "arimaCoefficients": { # Arima coefficients. # Arima coefficients. |
| 247 | "movingAverageCoefficients": [ # Moving-average coefficients, an array of double. |
| 248 | 3.14, |
| 249 | ], |
| 250 | "interceptCoefficient": 3.14, # Intercept coefficient, just a double not an array. |
| 251 | "autoRegressiveCoefficients": [ # Auto-regressive coefficients, an array of double. |
| 252 | 3.14, |
| 253 | ], |
| 254 | }, |
| 255 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 256 | "variance": 3.14, # Variance. |
| 257 | "logLikelihood": 3.14, # Log-likelihood. |
| 258 | "aic": 3.14, # AIC. |
| 259 | }, |
| 260 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 261 | "A String", |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 262 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 263 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
| 264 | "d": "A String", # Order of the differencing part. |
| 265 | "p": "A String", # Order of the autoregressive part. |
| 266 | "q": "A String", # Order of the moving-average part. |
| 267 | }, |
| 268 | "timeSeriesId": "A String", # The id to indicate different time series. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 269 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 270 | ], |
| 271 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 272 | "A String", |
| 273 | ], |
| 274 | }, |
| 275 | "durationMs": "A String", # Time taken to run the iteration in milliseconds. |
| 276 | "evalLoss": 3.14, # Loss computed on the eval data at the end of iteration. |
| 277 | "trainingLoss": 3.14, # Loss computed on the training data at the end of iteration. |
| 278 | "clusterInfos": [ # Information about top clusters for clustering models. |
| 279 | { # Information about a single cluster for clustering model. |
| 280 | "clusterRadius": 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster. |
| 281 | "centroidId": "A String", # Centroid id. |
| 282 | "clusterSize": "A String", # Cluster size, the total number of points assigned to the cluster. |
| 283 | }, |
| 284 | ], |
| 285 | "index": 42, # Index of the iteration, 0 based. |
| 286 | }, |
| 287 | ], |
| 288 | "evaluationMetrics": { # 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 | "binaryClassificationMetrics": { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models. |
| 290 | "positiveLabel": "A String", # Label representing the positive class. |
| 291 | "binaryConfusionMatrixList": [ # Binary confusion matrix at multiple thresholds. |
| 292 | { # Confusion matrix for binary classification models. |
| 293 | "falseNegatives": "A String", # Number of false samples predicted as false. |
| 294 | "f1Score": 3.14, # The equally weighted average of recall and precision. |
| 295 | "accuracy": 3.14, # The fraction of predictions given the correct label. |
| 296 | "recall": 3.14, # The fraction of actual positive labels that were given a positive prediction. |
| 297 | "falsePositives": "A String", # Number of false samples predicted as true. |
| 298 | "precision": 3.14, # The fraction of actual positive predictions that had positive actual labels. |
| 299 | "positiveClassThreshold": 3.14, # Threshold value used when computing each of the following metric. |
| 300 | "truePositives": "A String", # Number of true samples predicted as true. |
| 301 | "trueNegatives": "A String", # Number of true samples predicted as false. |
| 302 | }, |
| 303 | ], |
| 304 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 306 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 307 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 308 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 312 | }, |
| 313 | "negativeLabel": "A String", # Label representing the negative class. |
| 314 | }, |
| 315 | "clusteringMetrics": { # Evaluation metrics for clustering models. # Populated for clustering models. |
| 316 | "clusters": [ # [Beta] Information for all clusters. |
| 317 | { # Message containing the information about one cluster. |
| 318 | "featureValues": [ # Values of highly variant features for this cluster. |
| 319 | { # Representative value of a single feature within the cluster. |
| 320 | "featureColumn": "A String", # The feature column name. |
| 321 | "categoricalValue": { # Representative value of a categorical feature. # The categorical feature value. |
| 322 | "categoryCounts": [ # 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 "_OTHER_" and count as aggregate counts of remaining categories. |
| 323 | { # Represents the count of a single category within the cluster. |
| 324 | "category": "A String", # The name of category. |
| 325 | "count": "A String", # The count of training samples matching the category within the cluster. |
| 326 | }, |
| 327 | ], |
| 328 | }, |
| 329 | "numericalValue": 3.14, # The numerical feature value. This is the centroid value for this feature. |
| 330 | }, |
| 331 | ], |
| 332 | "centroidId": "A String", # Centroid id. |
| 333 | "count": "A String", # Count of training data rows that were assigned to this cluster. |
| 334 | }, |
| 335 | ], |
| 336 | "daviesBouldinIndex": 3.14, # Davies-Bouldin index. |
| 337 | "meanSquaredDistance": 3.14, # Mean of squared distances between each sample to its cluster centroid. |
| 338 | }, |
| 339 | "rankingMetrics": { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models. |
| 340 | "meanSquaredError": 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 | "meanAveragePrecision": 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 | "normalizedDiscountedCumulativeGain": 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 | "averageRank": 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 | "arimaForecastingMetrics": { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models. |
| 346 | "timeSeriesId": [ # Id to differentiate different time series for the large-scale case. |
| 347 | "A String", |
| 348 | ], |
| 349 | "arimaSingleModelForecastingMetrics": [ # 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 | "hasDrift": True or False, # Is arima model fitted with drift or not. It is always false when d is not 1. |
| 352 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 353 | "variance": 3.14, # Variance. |
| 354 | "logLikelihood": 3.14, # Log-likelihood. |
| 355 | "aic": 3.14, # AIC. |
| 356 | }, |
| 357 | "timeSeriesId": "A String", # The id to indicate different time series. |
| 358 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 359 | "A String", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 360 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 361 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 362 | "d": "A String", # Order of the differencing part. |
| 363 | "p": "A String", # Order of the autoregressive part. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 364 | "q": "A String", # Order of the moving-average part. |
| 365 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 366 | }, |
| 367 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 368 | "arimaFittingMetrics": [ # Arima model fitting metrics. |
| 369 | { # ARIMA model fitting metrics. |
| 370 | "variance": 3.14, # Variance. |
| 371 | "logLikelihood": 3.14, # Log-likelihood. |
| 372 | "aic": 3.14, # AIC. |
| 373 | }, |
| 374 | ], |
| 375 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 376 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 377 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 378 | "nonSeasonalOrder": [ # Non-seasonal order. |
| 379 | { # Arima order, can be used for both non-seasonal and seasonal parts. |
| 380 | "d": "A String", # Order of the differencing part. |
| 381 | "p": "A String", # Order of the autoregressive part. |
| 382 | "q": "A String", # Order of the moving-average part. |
| 383 | }, |
| 384 | ], |
| 385 | "hasDrift": [ # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 386 | True or False, |
| 387 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 388 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 389 | "multiClassClassificationMetrics": { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models. |
| 390 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 392 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 393 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 394 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 398 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 399 | "confusionMatrixList": [ # Confusion matrix at different thresholds. |
| 400 | { # Confusion matrix for multi-class classification models. |
| 401 | "confidenceThreshold": 3.14, # Confidence threshold used when computing the entries of the confusion matrix. |
| 402 | "rows": [ # One row per actual label. |
| 403 | { # A single row in the confusion matrix. |
| 404 | "actualLabel": "A String", # The original label of this row. |
| 405 | "entries": [ # Info describing predicted label distribution. |
| 406 | { # A single entry in the confusion matrix. |
| 407 | "itemCount": "A String", # Number of items being predicted as this label. |
| 408 | "predictedLabel": "A String", # The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 409 | }, |
| 410 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 411 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 412 | ], |
| 413 | }, |
| 414 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 415 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 416 | "regressionMetrics": { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models. |
| 417 | "medianAbsoluteError": 3.14, # Median absolute error. |
| 418 | "meanSquaredError": 3.14, # Mean squared error. |
| 419 | "meanSquaredLogError": 3.14, # Mean squared log error. |
| 420 | "rSquared": 3.14, # R^2 score. |
| 421 | "meanAbsoluteError": 3.14, # Mean absolute error. |
| 422 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 423 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 424 | "startTime": "A String", # The start time of this training run. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 425 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 426 | ], |
| 427 | "location": "A String", # Output only. The geographic location where the model resides. This value is inherited from the dataset. |
| 428 | "friendlyName": "A String", # Optional. A descriptive name for this model. |
| 429 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 430 | </div> |
| 431 | |
| 432 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 433 | <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 434 | <pre>Lists all models in the specified dataset. Requires the READER dataset role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 435 | |
| 436 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 437 | projectId: string, Required. Project ID of the models to list. (required) |
| 438 | datasetId: string, Required. Dataset ID of the models to list. (required) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 439 | 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 441 | |
| 442 | Returns: |
| 443 | An object of the form: |
| 444 | |
| 445 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 446 | "models": [ # Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 448 | "expirationTime": "A String", # 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 | "featureColumns": [ # Output only. Input feature columns that were used to train this model. |
| 450 | { # A field or a column. |
| 451 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 452 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 453 | "fields": [ |
| 454 | # Object with schema name: StandardSqlField |
| 455 | ], |
| 456 | }, |
| 457 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 458 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 459 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 460 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 461 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 462 | ], |
| 463 | "etag": "A String", # Output only. A hash of this resource. |
| 464 | "labelColumns": [ # Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns. |
| 465 | { # A field or a column. |
| 466 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 467 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 468 | "fields": [ |
| 469 | # Object with schema name: StandardSqlField |
| 470 | ], |
| 471 | }, |
| 472 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 473 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 474 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 475 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 476 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 477 | ], |
| 478 | "modelType": "A String", # Output only. Type of the model resource. |
| 479 | "description": "A String", # Optional. A user-friendly description of this model. |
| 480 | "labels": { # 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 | "a_key": "A String", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 483 | "creationTime": "A String", # Output only. The time when this model was created, in millisecs since the epoch. |
| 484 | "lastModifiedTime": "A String", # Output only. The time when this model was last modified, in millisecs since the epoch. |
| 485 | "encryptionConfiguration": { # 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 | "kmsKeyName": "A String", # [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 | "modelReference": { # Required. Unique identifier for this model. |
| 489 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 490 | "modelId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 492 | }, |
| 493 | "trainingRuns": [ # 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 | "trainingOptions": { # Options that were used for this training run, includes user specified and default options that were used. |
| 496 | "numClusters": "A String", # Number of clusters for clustering models. |
| 497 | "hiddenUnits": [ # Hidden units for dnn models. |
| 498 | "A String", |
| 499 | ], |
| 500 | "kmeansInitializationMethod": "A String", # The method used to initialize the centroids for kmeans algorithm. |
| 501 | "batchSize": "A String", # Batch size for dnn models. |
| 502 | "dataSplitEvalFraction": 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 | "l2Regularization": 3.14, # L2 regularization coefficient. |
| 504 | "horizon": "A String", # The number of periods ahead that need to be forecasted. |
| 505 | "preserveInputStructs": 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 | "modelUri": "A String", # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models. |
| 507 | "learnRateStrategy": "A String", # The strategy to determine learn rate for the current iteration. |
| 508 | "warmStart": True or False, # Whether to train a model from the last checkpoint. |
| 509 | "maxTreeDepth": "A String", # Maximum depth of a tree for boosted tree models. |
| 510 | "timeSeriesDataColumn": "A String", # Column to be designated as time series data for ARIMA model. |
| 511 | "timeSeriesIdColumn": "A String", # The id column that will be used to indicate different time series to forecast in parallel. |
| 512 | "minSplitLoss": 3.14, # Minimum split loss for boosted tree models. |
| 513 | "autoArimaMaxOrder": "A String", # The max value of non-seasonal p and q. |
| 514 | "inputLabelColumns": [ # Name of input label columns in training data. |
| 515 | "A String", |
| 516 | ], |
| 517 | "lossType": "A String", # Type of loss function used during training run. |
| 518 | "dataSplitMethod": "A String", # The data split type for training and evaluation, e.g. RANDOM. |
| 519 | "optimizationStrategy": "A String", # Optimization strategy for training linear regression models. |
| 520 | "labelClassWeights": { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models. |
| 521 | "a_key": 3.14, |
| 522 | }, |
| 523 | "earlyStop": True or False, # Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms. |
| 524 | "itemColumn": "A String", # Item column specified for matrix factorization models. |
| 525 | "autoArima": True or False, # Whether to enable auto ARIMA or not. |
| 526 | "timeSeriesTimestampColumn": "A String", # Column to be designated as time series timestamp for ARIMA model. |
| 527 | "userColumn": "A String", # User column specified for matrix factorization models. |
| 528 | "initialLearnRate": 3.14, # Specifies the initial learning rate for the line search learn rate strategy. |
| 529 | "subsample": 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models. |
| 530 | "dataFrequency": "A String", # The data frequency of a time series. |
| 531 | "walsAlpha": 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified. |
| 532 | "dropout": 3.14, # Dropout probability for dnn models. |
| 533 | "nonSeasonalOrder": { # 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 | "d": "A String", # Order of the differencing part. |
| 535 | "p": "A String", # Order of the autoregressive part. |
| 536 | "q": "A String", # Order of the moving-average part. |
| 537 | }, |
| 538 | "learnRate": 3.14, # Learning rate in training. Used only for iterative training algorithms. |
| 539 | "feedbackType": "A String", # Feedback type that specifies which algorithm to run for matrix factorization. |
| 540 | "maxIterations": "A String", # The maximum number of iterations in training. Used only for iterative training algorithms. |
| 541 | "holidayRegion": "A String", # 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 | "kmeansInitializationColumn": "A String", # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM. |
| 543 | "minRelativeProgress": 3.14, # When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms. |
| 544 | "numFactors": "A String", # Num factors specified for matrix factorization models. |
| 545 | "distanceType": "A String", # Distance type for clustering models. |
| 546 | "dataSplitColumn": "A String", # The column to split data with. This column won'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 | "includeDrift": True or False, # Include drift when fitting an ARIMA model. |
| 548 | "l1Regularization": 3.14, # L1 regularization coefficient. |
| 549 | }, |
| 550 | "dataSplitResult": { # 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 | "evaluationTable": { # Table reference of the evaluation data after split. |
| 552 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 554 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 555 | }, |
| 556 | "trainingTable": { # Table reference of the training data after split. |
| 557 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 559 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 560 | }, |
| 561 | }, |
| 562 | "results": [ # Output of each iteration run, results.size() <= max_iterations. |
| 563 | { # Information about a single iteration of the training run. |
| 564 | "learnRate": 3.14, # Learn rate used for this iteration. |
| 565 | "arimaResult": { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results. |
| 566 | "arimaModelInfo": [ # 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 | "hasDrift": True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 569 | "arimaCoefficients": { # Arima coefficients. # Arima coefficients. |
| 570 | "movingAverageCoefficients": [ # Moving-average coefficients, an array of double. |
| 571 | 3.14, |
| 572 | ], |
| 573 | "interceptCoefficient": 3.14, # Intercept coefficient, just a double not an array. |
| 574 | "autoRegressiveCoefficients": [ # Auto-regressive coefficients, an array of double. |
| 575 | 3.14, |
| 576 | ], |
| 577 | }, |
| 578 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 579 | "variance": 3.14, # Variance. |
| 580 | "logLikelihood": 3.14, # Log-likelihood. |
| 581 | "aic": 3.14, # AIC. |
| 582 | }, |
| 583 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 584 | "A String", |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 585 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 586 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
| 587 | "d": "A String", # Order of the differencing part. |
| 588 | "p": "A String", # Order of the autoregressive part. |
| 589 | "q": "A String", # Order of the moving-average part. |
| 590 | }, |
| 591 | "timeSeriesId": "A String", # The id to indicate different time series. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 592 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 593 | ], |
| 594 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 595 | "A String", |
| 596 | ], |
| 597 | }, |
| 598 | "durationMs": "A String", # Time taken to run the iteration in milliseconds. |
| 599 | "evalLoss": 3.14, # Loss computed on the eval data at the end of iteration. |
| 600 | "trainingLoss": 3.14, # Loss computed on the training data at the end of iteration. |
| 601 | "clusterInfos": [ # Information about top clusters for clustering models. |
| 602 | { # Information about a single cluster for clustering model. |
| 603 | "clusterRadius": 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster. |
| 604 | "centroidId": "A String", # Centroid id. |
| 605 | "clusterSize": "A String", # Cluster size, the total number of points assigned to the cluster. |
| 606 | }, |
| 607 | ], |
| 608 | "index": 42, # Index of the iteration, 0 based. |
| 609 | }, |
| 610 | ], |
| 611 | "evaluationMetrics": { # 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 | "binaryClassificationMetrics": { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models. |
| 613 | "positiveLabel": "A String", # Label representing the positive class. |
| 614 | "binaryConfusionMatrixList": [ # Binary confusion matrix at multiple thresholds. |
| 615 | { # Confusion matrix for binary classification models. |
| 616 | "falseNegatives": "A String", # Number of false samples predicted as false. |
| 617 | "f1Score": 3.14, # The equally weighted average of recall and precision. |
| 618 | "accuracy": 3.14, # The fraction of predictions given the correct label. |
| 619 | "recall": 3.14, # The fraction of actual positive labels that were given a positive prediction. |
| 620 | "falsePositives": "A String", # Number of false samples predicted as true. |
| 621 | "precision": 3.14, # The fraction of actual positive predictions that had positive actual labels. |
| 622 | "positiveClassThreshold": 3.14, # Threshold value used when computing each of the following metric. |
| 623 | "truePositives": "A String", # Number of true samples predicted as true. |
| 624 | "trueNegatives": "A String", # Number of true samples predicted as false. |
| 625 | }, |
| 626 | ], |
| 627 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 629 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 630 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 631 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 635 | }, |
| 636 | "negativeLabel": "A String", # Label representing the negative class. |
| 637 | }, |
| 638 | "clusteringMetrics": { # Evaluation metrics for clustering models. # Populated for clustering models. |
| 639 | "clusters": [ # [Beta] Information for all clusters. |
| 640 | { # Message containing the information about one cluster. |
| 641 | "featureValues": [ # Values of highly variant features for this cluster. |
| 642 | { # Representative value of a single feature within the cluster. |
| 643 | "featureColumn": "A String", # The feature column name. |
| 644 | "categoricalValue": { # Representative value of a categorical feature. # The categorical feature value. |
| 645 | "categoryCounts": [ # 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 "_OTHER_" and count as aggregate counts of remaining categories. |
| 646 | { # Represents the count of a single category within the cluster. |
| 647 | "category": "A String", # The name of category. |
| 648 | "count": "A String", # The count of training samples matching the category within the cluster. |
| 649 | }, |
| 650 | ], |
| 651 | }, |
| 652 | "numericalValue": 3.14, # The numerical feature value. This is the centroid value for this feature. |
| 653 | }, |
| 654 | ], |
| 655 | "centroidId": "A String", # Centroid id. |
| 656 | "count": "A String", # Count of training data rows that were assigned to this cluster. |
| 657 | }, |
| 658 | ], |
| 659 | "daviesBouldinIndex": 3.14, # Davies-Bouldin index. |
| 660 | "meanSquaredDistance": 3.14, # Mean of squared distances between each sample to its cluster centroid. |
| 661 | }, |
| 662 | "rankingMetrics": { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models. |
| 663 | "meanSquaredError": 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 | "meanAveragePrecision": 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 | "normalizedDiscountedCumulativeGain": 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 | "averageRank": 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 | "arimaForecastingMetrics": { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models. |
| 669 | "timeSeriesId": [ # Id to differentiate different time series for the large-scale case. |
| 670 | "A String", |
| 671 | ], |
| 672 | "arimaSingleModelForecastingMetrics": [ # 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 | "hasDrift": True or False, # Is arima model fitted with drift or not. It is always false when d is not 1. |
| 675 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 676 | "variance": 3.14, # Variance. |
| 677 | "logLikelihood": 3.14, # Log-likelihood. |
| 678 | "aic": 3.14, # AIC. |
| 679 | }, |
| 680 | "timeSeriesId": "A String", # The id to indicate different time series. |
| 681 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 682 | "A String", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 683 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 684 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 685 | "d": "A String", # Order of the differencing part. |
| 686 | "p": "A String", # Order of the autoregressive part. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 687 | "q": "A String", # Order of the moving-average part. |
| 688 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 689 | }, |
| 690 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 691 | "arimaFittingMetrics": [ # Arima model fitting metrics. |
| 692 | { # ARIMA model fitting metrics. |
| 693 | "variance": 3.14, # Variance. |
| 694 | "logLikelihood": 3.14, # Log-likelihood. |
| 695 | "aic": 3.14, # AIC. |
| 696 | }, |
| 697 | ], |
| 698 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 699 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 700 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 701 | "nonSeasonalOrder": [ # Non-seasonal order. |
| 702 | { # Arima order, can be used for both non-seasonal and seasonal parts. |
| 703 | "d": "A String", # Order of the differencing part. |
| 704 | "p": "A String", # Order of the autoregressive part. |
| 705 | "q": "A String", # Order of the moving-average part. |
| 706 | }, |
| 707 | ], |
| 708 | "hasDrift": [ # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 709 | True or False, |
| 710 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 711 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 712 | "multiClassClassificationMetrics": { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models. |
| 713 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 715 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 716 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 717 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 721 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 722 | "confusionMatrixList": [ # Confusion matrix at different thresholds. |
| 723 | { # Confusion matrix for multi-class classification models. |
| 724 | "confidenceThreshold": 3.14, # Confidence threshold used when computing the entries of the confusion matrix. |
| 725 | "rows": [ # One row per actual label. |
| 726 | { # A single row in the confusion matrix. |
| 727 | "actualLabel": "A String", # The original label of this row. |
| 728 | "entries": [ # Info describing predicted label distribution. |
| 729 | { # A single entry in the confusion matrix. |
| 730 | "itemCount": "A String", # Number of items being predicted as this label. |
| 731 | "predictedLabel": "A String", # The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 732 | }, |
| 733 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 734 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 735 | ], |
| 736 | }, |
| 737 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 738 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 739 | "regressionMetrics": { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models. |
| 740 | "medianAbsoluteError": 3.14, # Median absolute error. |
| 741 | "meanSquaredError": 3.14, # Mean squared error. |
| 742 | "meanSquaredLogError": 3.14, # Mean squared log error. |
| 743 | "rSquared": 3.14, # R^2 score. |
| 744 | "meanAbsoluteError": 3.14, # Mean absolute error. |
| 745 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 746 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 747 | "startTime": "A String", # The start time of this training run. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 748 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 749 | ], |
| 750 | "location": "A String", # Output only. The geographic location where the model resides. This value is inherited from the dataset. |
| 751 | "friendlyName": "A String", # Optional. A descriptive name for this model. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 752 | }, |
| 753 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 754 | "nextPageToken": "A String", # A token to request the next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 755 | }</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 | |
| 762 | Args: |
| 763 | previous_request: The request for the previous page. (required) |
| 764 | previous_response: The response from the request for the previous page. (required) |
| 765 | |
| 766 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 767 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 768 | page. Returns None if there are no more items in the collection. |
| 769 | </pre> |
| 770 | </div> |
| 771 | |
| 772 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 773 | <code class="details" id="patch">patch(projectId, datasetId, modelId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 774 | <pre>Patch specific fields in the specified model. |
| 775 | |
| 776 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 777 | 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 781 | The object takes the form of: |
| 782 | |
| 783 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 784 | "expirationTime": "A String", # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 785 | "featureColumns": [ # Output only. Input feature columns that were used to train this model. |
| 786 | { # A field or a column. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 787 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 788 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 789 | "fields": [ |
| 790 | # Object with schema name: StandardSqlField |
| 791 | ], |
| 792 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 793 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 794 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 795 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 796 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 797 | }, |
| 798 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 799 | "etag": "A String", # Output only. A hash of this resource. |
| 800 | "labelColumns": [ # Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns. |
| 801 | { # A field or a column. |
| 802 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 803 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 804 | "fields": [ |
| 805 | # Object with schema name: StandardSqlField |
| 806 | ], |
| 807 | }, |
| 808 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 809 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
| 810 | }, |
| 811 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
| 812 | }, |
| 813 | ], |
| 814 | "modelType": "A String", # Output only. Type of the model resource. |
| 815 | "description": "A String", # Optional. A user-friendly description of this model. |
| 816 | "labels": { # 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 | "a_key": "A String", |
| 818 | }, |
| 819 | "creationTime": "A String", # Output only. The time when this model was created, in millisecs since the epoch. |
| 820 | "lastModifiedTime": "A String", # Output only. The time when this model was last modified, in millisecs since the epoch. |
| 821 | "encryptionConfiguration": { # 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 | "kmsKeyName": "A String", # [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 | "modelReference": { # Required. Unique identifier for this model. |
| 825 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 826 | "modelId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 828 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 829 | "trainingRuns": [ # Output only. Information for all training runs in increasing order of start_time. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 830 | { # Information about a single training query run for the model. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 831 | "trainingOptions": { # Options that were used for this training run, includes user specified and default options that were used. |
| 832 | "numClusters": "A String", # Number of clusters for clustering models. |
| 833 | "hiddenUnits": [ # Hidden units for dnn models. |
| 834 | "A String", |
| 835 | ], |
| 836 | "kmeansInitializationMethod": "A String", # The method used to initialize the centroids for kmeans algorithm. |
| 837 | "batchSize": "A String", # Batch size for dnn models. |
| 838 | "dataSplitEvalFraction": 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 | "l2Regularization": 3.14, # L2 regularization coefficient. |
| 840 | "horizon": "A String", # The number of periods ahead that need to be forecasted. |
| 841 | "preserveInputStructs": 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 | "modelUri": "A String", # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models. |
| 843 | "learnRateStrategy": "A String", # The strategy to determine learn rate for the current iteration. |
| 844 | "warmStart": True or False, # Whether to train a model from the last checkpoint. |
| 845 | "maxTreeDepth": "A String", # Maximum depth of a tree for boosted tree models. |
| 846 | "timeSeriesDataColumn": "A String", # Column to be designated as time series data for ARIMA model. |
| 847 | "timeSeriesIdColumn": "A String", # The id column that will be used to indicate different time series to forecast in parallel. |
| 848 | "minSplitLoss": 3.14, # Minimum split loss for boosted tree models. |
| 849 | "autoArimaMaxOrder": "A String", # The max value of non-seasonal p and q. |
| 850 | "inputLabelColumns": [ # Name of input label columns in training data. |
| 851 | "A String", |
| 852 | ], |
| 853 | "lossType": "A String", # Type of loss function used during training run. |
| 854 | "dataSplitMethod": "A String", # The data split type for training and evaluation, e.g. RANDOM. |
| 855 | "optimizationStrategy": "A String", # Optimization strategy for training linear regression models. |
| 856 | "labelClassWeights": { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models. |
| 857 | "a_key": 3.14, |
| 858 | }, |
| 859 | "earlyStop": True or False, # Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms. |
| 860 | "itemColumn": "A String", # Item column specified for matrix factorization models. |
| 861 | "autoArima": True or False, # Whether to enable auto ARIMA or not. |
| 862 | "timeSeriesTimestampColumn": "A String", # Column to be designated as time series timestamp for ARIMA model. |
| 863 | "userColumn": "A String", # User column specified for matrix factorization models. |
| 864 | "initialLearnRate": 3.14, # Specifies the initial learning rate for the line search learn rate strategy. |
| 865 | "subsample": 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models. |
| 866 | "dataFrequency": "A String", # The data frequency of a time series. |
| 867 | "walsAlpha": 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified. |
| 868 | "dropout": 3.14, # Dropout probability for dnn models. |
| 869 | "nonSeasonalOrder": { # 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 | "d": "A String", # Order of the differencing part. |
| 871 | "p": "A String", # Order of the autoregressive part. |
| 872 | "q": "A String", # Order of the moving-average part. |
| 873 | }, |
| 874 | "learnRate": 3.14, # Learning rate in training. Used only for iterative training algorithms. |
| 875 | "feedbackType": "A String", # Feedback type that specifies which algorithm to run for matrix factorization. |
| 876 | "maxIterations": "A String", # The maximum number of iterations in training. Used only for iterative training algorithms. |
| 877 | "holidayRegion": "A String", # 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 | "kmeansInitializationColumn": "A String", # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM. |
| 879 | "minRelativeProgress": 3.14, # When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms. |
| 880 | "numFactors": "A String", # Num factors specified for matrix factorization models. |
| 881 | "distanceType": "A String", # Distance type for clustering models. |
| 882 | "dataSplitColumn": "A String", # The column to split data with. This column won'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 | "includeDrift": True or False, # Include drift when fitting an ARIMA model. |
| 884 | "l1Regularization": 3.14, # L1 regularization coefficient. |
| 885 | }, |
| 886 | "dataSplitResult": { # 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 | "evaluationTable": { # Table reference of the evaluation data after split. |
| 888 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 890 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 891 | }, |
| 892 | "trainingTable": { # Table reference of the training data after split. |
| 893 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 895 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 896 | }, |
| 897 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 898 | "results": [ # Output of each iteration run, results.size() <= max_iterations. |
| 899 | { # Information about a single iteration of the training run. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 900 | "learnRate": 3.14, # Learn rate used for this iteration. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 901 | "arimaResult": { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results. |
| 902 | "arimaModelInfo": [ # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 903 | { # Arima model information. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 904 | "hasDrift": True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 905 | "arimaCoefficients": { # Arima coefficients. # Arima coefficients. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 906 | "movingAverageCoefficients": [ # Moving-average coefficients, an array of double. |
| 907 | 3.14, |
| 908 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 909 | "interceptCoefficient": 3.14, # Intercept coefficient, just a double not an array. |
| 910 | "autoRegressiveCoefficients": [ # Auto-regressive coefficients, an array of double. |
| 911 | 3.14, |
| 912 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 913 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 914 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 915 | "variance": 3.14, # Variance. |
| 916 | "logLikelihood": 3.14, # Log-likelihood. |
| 917 | "aic": 3.14, # AIC. |
| 918 | }, |
| 919 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 920 | "A String", |
| 921 | ], |
| 922 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 923 | "d": "A String", # Order of the differencing part. |
| 924 | "p": "A String", # Order of the autoregressive part. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 925 | "q": "A String", # Order of the moving-average part. |
| 926 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 927 | "timeSeriesId": "A String", # The id to indicate different time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 928 | }, |
| 929 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 930 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 931 | "A String", |
| 932 | ], |
| 933 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 934 | "durationMs": "A String", # Time taken to run the iteration in milliseconds. |
| 935 | "evalLoss": 3.14, # Loss computed on the eval data at the end of iteration. |
| 936 | "trainingLoss": 3.14, # Loss computed on the training data at the end of iteration. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 937 | "clusterInfos": [ # Information about top clusters for clustering models. |
| 938 | { # Information about a single cluster for clustering model. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 939 | "clusterRadius": 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 940 | "centroidId": "A String", # Centroid id. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 941 | "clusterSize": "A String", # Cluster size, the total number of points assigned to the cluster. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 942 | }, |
| 943 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 944 | "index": 42, # Index of the iteration, 0 based. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 945 | }, |
| 946 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 947 | "evaluationMetrics": { # 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 | "binaryClassificationMetrics": { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models. |
| 949 | "positiveLabel": "A String", # Label representing the positive class. |
| 950 | "binaryConfusionMatrixList": [ # Binary confusion matrix at multiple thresholds. |
| 951 | { # Confusion matrix for binary classification models. |
| 952 | "falseNegatives": "A String", # Number of false samples predicted as false. |
| 953 | "f1Score": 3.14, # The equally weighted average of recall and precision. |
| 954 | "accuracy": 3.14, # The fraction of predictions given the correct label. |
| 955 | "recall": 3.14, # The fraction of actual positive labels that were given a positive prediction. |
| 956 | "falsePositives": "A String", # Number of false samples predicted as true. |
| 957 | "precision": 3.14, # The fraction of actual positive predictions that had positive actual labels. |
| 958 | "positiveClassThreshold": 3.14, # Threshold value used when computing each of the following metric. |
| 959 | "truePositives": "A String", # Number of true samples predicted as true. |
| 960 | "trueNegatives": "A String", # Number of true samples predicted as false. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 961 | }, |
| 962 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 963 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 965 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 966 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 967 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 971 | }, |
| 972 | "negativeLabel": "A String", # Label representing the negative class. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 973 | }, |
| 974 | "clusteringMetrics": { # Evaluation metrics for clustering models. # Populated for clustering models. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 975 | "clusters": [ # [Beta] Information for all clusters. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 976 | { # Message containing the information about one cluster. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 977 | "featureValues": [ # Values of highly variant features for this cluster. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 978 | { # Representative value of a single feature within the cluster. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 979 | "featureColumn": "A String", # The feature column name. |
| 980 | "categoricalValue": { # Representative value of a categorical feature. # The categorical feature value. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 981 | "categoryCounts": [ # 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 "_OTHER_" and count as aggregate counts of remaining categories. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 982 | { # Represents the count of a single category within the cluster. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 983 | "category": "A String", # The name of category. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 984 | "count": "A String", # The count of training samples matching the category within the cluster. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 985 | }, |
| 986 | ], |
| 987 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 988 | "numericalValue": 3.14, # The numerical feature value. This is the centroid value for this feature. |
| 989 | }, |
| 990 | ], |
| 991 | "centroidId": "A String", # Centroid id. |
| 992 | "count": "A String", # Count of training data rows that were assigned to this cluster. |
| 993 | }, |
| 994 | ], |
| 995 | "daviesBouldinIndex": 3.14, # Davies-Bouldin index. |
| 996 | "meanSquaredDistance": 3.14, # Mean of squared distances between each sample to its cluster centroid. |
| 997 | }, |
| 998 | "rankingMetrics": { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models. |
| 999 | "meanSquaredError": 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 | "meanAveragePrecision": 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 | "normalizedDiscountedCumulativeGain": 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 | "averageRank": 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 | "arimaForecastingMetrics": { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models. |
| 1005 | "timeSeriesId": [ # Id to differentiate different time series for the large-scale case. |
| 1006 | "A String", |
| 1007 | ], |
| 1008 | "arimaSingleModelForecastingMetrics": [ # 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 | "hasDrift": True or False, # Is arima model fitted with drift or not. It is always false when d is not 1. |
| 1011 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 1012 | "variance": 3.14, # Variance. |
| 1013 | "logLikelihood": 3.14, # Log-likelihood. |
| 1014 | "aic": 3.14, # AIC. |
| 1015 | }, |
| 1016 | "timeSeriesId": "A String", # The id to indicate different time series. |
| 1017 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1018 | "A String", |
| 1019 | ], |
| 1020 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
| 1021 | "d": "A String", # Order of the differencing part. |
| 1022 | "p": "A String", # Order of the autoregressive part. |
| 1023 | "q": "A String", # Order of the moving-average part. |
| 1024 | }, |
| 1025 | }, |
| 1026 | ], |
| 1027 | "arimaFittingMetrics": [ # Arima model fitting metrics. |
| 1028 | { # ARIMA model fitting metrics. |
| 1029 | "variance": 3.14, # Variance. |
| 1030 | "logLikelihood": 3.14, # Log-likelihood. |
| 1031 | "aic": 3.14, # AIC. |
| 1032 | }, |
| 1033 | ], |
| 1034 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1035 | "A String", |
| 1036 | ], |
| 1037 | "nonSeasonalOrder": [ # Non-seasonal order. |
| 1038 | { # Arima order, can be used for both non-seasonal and seasonal parts. |
| 1039 | "d": "A String", # Order of the differencing part. |
| 1040 | "p": "A String", # Order of the autoregressive part. |
| 1041 | "q": "A String", # Order of the moving-average part. |
| 1042 | }, |
| 1043 | ], |
| 1044 | "hasDrift": [ # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 1045 | True or False, |
| 1046 | ], |
| 1047 | }, |
| 1048 | "multiClassClassificationMetrics": { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models. |
| 1049 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 1051 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 1052 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 1053 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 1057 | }, |
| 1058 | "confusionMatrixList": [ # Confusion matrix at different thresholds. |
| 1059 | { # Confusion matrix for multi-class classification models. |
| 1060 | "confidenceThreshold": 3.14, # Confidence threshold used when computing the entries of the confusion matrix. |
| 1061 | "rows": [ # One row per actual label. |
| 1062 | { # A single row in the confusion matrix. |
| 1063 | "actualLabel": "A String", # The original label of this row. |
| 1064 | "entries": [ # Info describing predicted label distribution. |
| 1065 | { # A single entry in the confusion matrix. |
| 1066 | "itemCount": "A String", # Number of items being predicted as this label. |
| 1067 | "predictedLabel": "A String", # The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold. |
| 1068 | }, |
| 1069 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1070 | }, |
| 1071 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1072 | }, |
| 1073 | ], |
| 1074 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1075 | "regressionMetrics": { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1076 | "medianAbsoluteError": 3.14, # Median absolute error. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1077 | "meanSquaredError": 3.14, # Mean squared error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1078 | "meanSquaredLogError": 3.14, # Mean squared log error. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1079 | "rSquared": 3.14, # R^2 score. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1080 | "meanAbsoluteError": 3.14, # Mean absolute error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1081 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1082 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1083 | "startTime": "A String", # The start time of this training run. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1084 | }, |
| 1085 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1086 | "location": "A String", # Output only. The geographic location where the model resides. This value is inherited from the dataset. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1087 | "friendlyName": "A String", # Optional. A descriptive name for this model. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1088 | } |
| 1089 | |
| 1090 | |
| 1091 | Returns: |
| 1092 | An object of the form: |
| 1093 | |
| 1094 | { |
| 1095 | "expirationTime": "A String", # 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 | "featureColumns": [ # Output only. Input feature columns that were used to train this model. |
| 1097 | { # A field or a column. |
| 1098 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 1099 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 1100 | "fields": [ |
| 1101 | # Object with schema name: StandardSqlField |
| 1102 | ], |
| 1103 | }, |
| 1104 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 1105 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
| 1106 | }, |
| 1107 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
| 1108 | }, |
| 1109 | ], |
| 1110 | "etag": "A String", # Output only. A hash of this resource. |
| 1111 | "labelColumns": [ # Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns. |
| 1112 | { # A field or a column. |
| 1113 | "type": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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 "type" field). |
| 1114 | "structType": { # The fields of this struct, in order, if type_kind = "STRUCT". |
| 1115 | "fields": [ |
| 1116 | # Object with schema name: StandardSqlField |
| 1117 | ], |
| 1118 | }, |
| 1119 | "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY". |
| 1120 | "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). |
| 1121 | }, |
| 1122 | "name": "A String", # Optional. The name of this field. Can be absent for struct fields. |
| 1123 | }, |
| 1124 | ], |
| 1125 | "modelType": "A String", # Output only. Type of the model resource. |
| 1126 | "description": "A String", # Optional. A user-friendly description of this model. |
| 1127 | "labels": { # 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 | "a_key": "A String", |
| 1129 | }, |
| 1130 | "creationTime": "A String", # Output only. The time when this model was created, in millisecs since the epoch. |
| 1131 | "lastModifiedTime": "A String", # Output only. The time when this model was last modified, in millisecs since the epoch. |
| 1132 | "encryptionConfiguration": { # 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 | "kmsKeyName": "A String", # [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 | "modelReference": { # Required. Unique identifier for this model. |
| 1136 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 1137 | "modelId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 1139 | }, |
| 1140 | "trainingRuns": [ # 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 | "trainingOptions": { # Options that were used for this training run, includes user specified and default options that were used. |
| 1143 | "numClusters": "A String", # Number of clusters for clustering models. |
| 1144 | "hiddenUnits": [ # Hidden units for dnn models. |
| 1145 | "A String", |
| 1146 | ], |
| 1147 | "kmeansInitializationMethod": "A String", # The method used to initialize the centroids for kmeans algorithm. |
| 1148 | "batchSize": "A String", # Batch size for dnn models. |
| 1149 | "dataSplitEvalFraction": 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 | "l2Regularization": 3.14, # L2 regularization coefficient. |
| 1151 | "horizon": "A String", # The number of periods ahead that need to be forecasted. |
| 1152 | "preserveInputStructs": 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 | "modelUri": "A String", # [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models. |
| 1154 | "learnRateStrategy": "A String", # The strategy to determine learn rate for the current iteration. |
| 1155 | "warmStart": True or False, # Whether to train a model from the last checkpoint. |
| 1156 | "maxTreeDepth": "A String", # Maximum depth of a tree for boosted tree models. |
| 1157 | "timeSeriesDataColumn": "A String", # Column to be designated as time series data for ARIMA model. |
| 1158 | "timeSeriesIdColumn": "A String", # The id column that will be used to indicate different time series to forecast in parallel. |
| 1159 | "minSplitLoss": 3.14, # Minimum split loss for boosted tree models. |
| 1160 | "autoArimaMaxOrder": "A String", # The max value of non-seasonal p and q. |
| 1161 | "inputLabelColumns": [ # Name of input label columns in training data. |
| 1162 | "A String", |
| 1163 | ], |
| 1164 | "lossType": "A String", # Type of loss function used during training run. |
| 1165 | "dataSplitMethod": "A String", # The data split type for training and evaluation, e.g. RANDOM. |
| 1166 | "optimizationStrategy": "A String", # Optimization strategy for training linear regression models. |
| 1167 | "labelClassWeights": { # Weights associated with each label class, for rebalancing the training data. Only applicable for classification models. |
| 1168 | "a_key": 3.14, |
| 1169 | }, |
| 1170 | "earlyStop": True or False, # Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms. |
| 1171 | "itemColumn": "A String", # Item column specified for matrix factorization models. |
| 1172 | "autoArima": True or False, # Whether to enable auto ARIMA or not. |
| 1173 | "timeSeriesTimestampColumn": "A String", # Column to be designated as time series timestamp for ARIMA model. |
| 1174 | "userColumn": "A String", # User column specified for matrix factorization models. |
| 1175 | "initialLearnRate": 3.14, # Specifies the initial learning rate for the line search learn rate strategy. |
| 1176 | "subsample": 3.14, # Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models. |
| 1177 | "dataFrequency": "A String", # The data frequency of a time series. |
| 1178 | "walsAlpha": 3.14, # Hyperparameter for matrix factoration when implicit feedback type is specified. |
| 1179 | "dropout": 3.14, # Dropout probability for dnn models. |
| 1180 | "nonSeasonalOrder": { # 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 | "d": "A String", # Order of the differencing part. |
| 1182 | "p": "A String", # Order of the autoregressive part. |
| 1183 | "q": "A String", # Order of the moving-average part. |
| 1184 | }, |
| 1185 | "learnRate": 3.14, # Learning rate in training. Used only for iterative training algorithms. |
| 1186 | "feedbackType": "A String", # Feedback type that specifies which algorithm to run for matrix factorization. |
| 1187 | "maxIterations": "A String", # The maximum number of iterations in training. Used only for iterative training algorithms. |
| 1188 | "holidayRegion": "A String", # 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 | "kmeansInitializationColumn": "A String", # The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM. |
| 1190 | "minRelativeProgress": 3.14, # When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms. |
| 1191 | "numFactors": "A String", # Num factors specified for matrix factorization models. |
| 1192 | "distanceType": "A String", # Distance type for clustering models. |
| 1193 | "dataSplitColumn": "A String", # The column to split data with. This column won'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 | "includeDrift": True or False, # Include drift when fitting an ARIMA model. |
| 1195 | "l1Regularization": 3.14, # L1 regularization coefficient. |
| 1196 | }, |
| 1197 | "dataSplitResult": { # 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 | "evaluationTable": { # Table reference of the evaluation data after split. |
| 1199 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1201 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1202 | }, |
| 1203 | "trainingTable": { # Table reference of the training data after split. |
| 1204 | "tableId": "A String", # [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 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1206 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1207 | }, |
| 1208 | }, |
| 1209 | "results": [ # Output of each iteration run, results.size() <= max_iterations. |
| 1210 | { # Information about a single iteration of the training run. |
| 1211 | "learnRate": 3.14, # Learn rate used for this iteration. |
| 1212 | "arimaResult": { # (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results. |
| 1213 | "arimaModelInfo": [ # 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 | "hasDrift": True or False, # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 1216 | "arimaCoefficients": { # Arima coefficients. # Arima coefficients. |
| 1217 | "movingAverageCoefficients": [ # Moving-average coefficients, an array of double. |
| 1218 | 3.14, |
| 1219 | ], |
| 1220 | "interceptCoefficient": 3.14, # Intercept coefficient, just a double not an array. |
| 1221 | "autoRegressiveCoefficients": [ # Auto-regressive coefficients, an array of double. |
| 1222 | 3.14, |
| 1223 | ], |
| 1224 | }, |
| 1225 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 1226 | "variance": 3.14, # Variance. |
| 1227 | "logLikelihood": 3.14, # Log-likelihood. |
| 1228 | "aic": 3.14, # AIC. |
| 1229 | }, |
| 1230 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1231 | "A String", |
| 1232 | ], |
| 1233 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
| 1234 | "d": "A String", # Order of the differencing part. |
| 1235 | "p": "A String", # Order of the autoregressive part. |
| 1236 | "q": "A String", # Order of the moving-average part. |
| 1237 | }, |
| 1238 | "timeSeriesId": "A String", # The id to indicate different time series. |
| 1239 | }, |
| 1240 | ], |
| 1241 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1242 | "A String", |
| 1243 | ], |
| 1244 | }, |
| 1245 | "durationMs": "A String", # Time taken to run the iteration in milliseconds. |
| 1246 | "evalLoss": 3.14, # Loss computed on the eval data at the end of iteration. |
| 1247 | "trainingLoss": 3.14, # Loss computed on the training data at the end of iteration. |
| 1248 | "clusterInfos": [ # Information about top clusters for clustering models. |
| 1249 | { # Information about a single cluster for clustering model. |
| 1250 | "clusterRadius": 3.14, # Cluster radius, the average distance from centroid to each point assigned to the cluster. |
| 1251 | "centroidId": "A String", # Centroid id. |
| 1252 | "clusterSize": "A String", # Cluster size, the total number of points assigned to the cluster. |
| 1253 | }, |
| 1254 | ], |
| 1255 | "index": 42, # Index of the iteration, 0 based. |
| 1256 | }, |
| 1257 | ], |
| 1258 | "evaluationMetrics": { # 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 | "binaryClassificationMetrics": { # Evaluation metrics for binary classification/classifier models. # Populated for binary classification/classifier models. |
| 1260 | "positiveLabel": "A String", # Label representing the positive class. |
| 1261 | "binaryConfusionMatrixList": [ # Binary confusion matrix at multiple thresholds. |
| 1262 | { # Confusion matrix for binary classification models. |
| 1263 | "falseNegatives": "A String", # Number of false samples predicted as false. |
| 1264 | "f1Score": 3.14, # The equally weighted average of recall and precision. |
| 1265 | "accuracy": 3.14, # The fraction of predictions given the correct label. |
| 1266 | "recall": 3.14, # The fraction of actual positive labels that were given a positive prediction. |
| 1267 | "falsePositives": "A String", # Number of false samples predicted as true. |
| 1268 | "precision": 3.14, # The fraction of actual positive predictions that had positive actual labels. |
| 1269 | "positiveClassThreshold": 3.14, # Threshold value used when computing each of the following metric. |
| 1270 | "truePositives": "A String", # Number of true samples predicted as true. |
| 1271 | "trueNegatives": "A String", # Number of true samples predicted as false. |
| 1272 | }, |
| 1273 | ], |
| 1274 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 1276 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 1277 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 1278 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 1282 | }, |
| 1283 | "negativeLabel": "A String", # Label representing the negative class. |
| 1284 | }, |
| 1285 | "clusteringMetrics": { # Evaluation metrics for clustering models. # Populated for clustering models. |
| 1286 | "clusters": [ # [Beta] Information for all clusters. |
| 1287 | { # Message containing the information about one cluster. |
| 1288 | "featureValues": [ # Values of highly variant features for this cluster. |
| 1289 | { # Representative value of a single feature within the cluster. |
| 1290 | "featureColumn": "A String", # The feature column name. |
| 1291 | "categoricalValue": { # Representative value of a categorical feature. # The categorical feature value. |
| 1292 | "categoryCounts": [ # 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 "_OTHER_" and count as aggregate counts of remaining categories. |
| 1293 | { # Represents the count of a single category within the cluster. |
| 1294 | "category": "A String", # The name of category. |
| 1295 | "count": "A String", # The count of training samples matching the category within the cluster. |
| 1296 | }, |
| 1297 | ], |
| 1298 | }, |
| 1299 | "numericalValue": 3.14, # The numerical feature value. This is the centroid value for this feature. |
| 1300 | }, |
| 1301 | ], |
| 1302 | "centroidId": "A String", # Centroid id. |
| 1303 | "count": "A String", # Count of training data rows that were assigned to this cluster. |
| 1304 | }, |
| 1305 | ], |
| 1306 | "daviesBouldinIndex": 3.14, # Davies-Bouldin index. |
| 1307 | "meanSquaredDistance": 3.14, # Mean of squared distances between each sample to its cluster centroid. |
| 1308 | }, |
| 1309 | "rankingMetrics": { # Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit. # Populated for implicit feedback type matrix factorization models. |
| 1310 | "meanSquaredError": 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 | "meanAveragePrecision": 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 | "normalizedDiscountedCumulativeGain": 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 | "averageRank": 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 | "arimaForecastingMetrics": { # Model evaluation metrics for ARIMA forecasting models. # Populated for ARIMA models. |
| 1316 | "timeSeriesId": [ # Id to differentiate different time series for the large-scale case. |
| 1317 | "A String", |
| 1318 | ], |
| 1319 | "arimaSingleModelForecastingMetrics": [ # 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 | "hasDrift": True or False, # Is arima model fitted with drift or not. It is always false when d is not 1. |
| 1322 | "arimaFittingMetrics": { # ARIMA model fitting metrics. # Arima fitting metrics. |
| 1323 | "variance": 3.14, # Variance. |
| 1324 | "logLikelihood": 3.14, # Log-likelihood. |
| 1325 | "aic": 3.14, # AIC. |
| 1326 | }, |
| 1327 | "timeSeriesId": "A String", # The id to indicate different time series. |
| 1328 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1329 | "A String", |
| 1330 | ], |
| 1331 | "nonSeasonalOrder": { # Arima order, can be used for both non-seasonal and seasonal parts. # Non-seasonal order. |
| 1332 | "d": "A String", # Order of the differencing part. |
| 1333 | "p": "A String", # Order of the autoregressive part. |
| 1334 | "q": "A String", # Order of the moving-average part. |
| 1335 | }, |
| 1336 | }, |
| 1337 | ], |
| 1338 | "arimaFittingMetrics": [ # Arima model fitting metrics. |
| 1339 | { # ARIMA model fitting metrics. |
| 1340 | "variance": 3.14, # Variance. |
| 1341 | "logLikelihood": 3.14, # Log-likelihood. |
| 1342 | "aic": 3.14, # AIC. |
| 1343 | }, |
| 1344 | ], |
| 1345 | "seasonalPeriods": [ # Seasonal periods. Repeated because multiple periods are supported for one time series. |
| 1346 | "A String", |
| 1347 | ], |
| 1348 | "nonSeasonalOrder": [ # Non-seasonal order. |
| 1349 | { # Arima order, can be used for both non-seasonal and seasonal parts. |
| 1350 | "d": "A String", # Order of the differencing part. |
| 1351 | "p": "A String", # Order of the autoregressive part. |
| 1352 | "q": "A String", # Order of the moving-average part. |
| 1353 | }, |
| 1354 | ], |
| 1355 | "hasDrift": [ # Whether Arima model fitted with drift or not. It is always false when d is not 1. |
| 1356 | True or False, |
| 1357 | ], |
| 1358 | }, |
| 1359 | "multiClassClassificationMetrics": { # Evaluation metrics for multi-class classification/classifier models. # Populated for multi-class classification/classifier models. |
| 1360 | "aggregateClassificationMetrics": { # 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 | "accuracy": 3.14, # Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric. |
| 1362 | "f1Score": 3.14, # The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric. |
| 1363 | "rocAuc": 3.14, # Area Under a ROC Curve. For multiclass this is a macro-averaged metric. |
| 1364 | "precision": 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 | "threshold": 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 | "recall": 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 | "logLoss": 3.14, # Logarithmic Loss. For multiclass this is a macro-averaged metric. |
| 1368 | }, |
| 1369 | "confusionMatrixList": [ # Confusion matrix at different thresholds. |
| 1370 | { # Confusion matrix for multi-class classification models. |
| 1371 | "confidenceThreshold": 3.14, # Confidence threshold used when computing the entries of the confusion matrix. |
| 1372 | "rows": [ # One row per actual label. |
| 1373 | { # A single row in the confusion matrix. |
| 1374 | "actualLabel": "A String", # The original label of this row. |
| 1375 | "entries": [ # Info describing predicted label distribution. |
| 1376 | { # A single entry in the confusion matrix. |
| 1377 | "itemCount": "A String", # Number of items being predicted as this label. |
| 1378 | "predictedLabel": "A String", # The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold. |
| 1379 | }, |
| 1380 | ], |
| 1381 | }, |
| 1382 | ], |
| 1383 | }, |
| 1384 | ], |
| 1385 | }, |
| 1386 | "regressionMetrics": { # Evaluation metrics for regression and explicit feedback type matrix factorization models. # Populated for regression models and explicit feedback type matrix factorization models. |
| 1387 | "medianAbsoluteError": 3.14, # Median absolute error. |
| 1388 | "meanSquaredError": 3.14, # Mean squared error. |
| 1389 | "meanSquaredLogError": 3.14, # Mean squared log error. |
| 1390 | "rSquared": 3.14, # R^2 score. |
| 1391 | "meanAbsoluteError": 3.14, # Mean absolute error. |
| 1392 | }, |
| 1393 | }, |
| 1394 | "startTime": "A String", # The start time of this training run. |
| 1395 | }, |
| 1396 | ], |
| 1397 | "location": "A String", # Output only. The geographic location where the model resides. This value is inherited from the dataset. |
| 1398 | "friendlyName": "A String", # Optional. A descriptive name for this model. |
| 1399 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1400 | </div> |
| 1401 | |
| 1402 | </body></html> |