Autogenerated update (2019-03-31)

Update:
- bigquery_v2
- cloudtasks_v2
This commit is contained in:
Google APIs 2019-03-31 00:37:00 +00:00
parent ca79486a04
commit a78320a77c
6 changed files with 1539 additions and 2 deletions

View File

@ -10902,6 +10902,14 @@
"/appstate:v1/quotaUser": quota_user
"/appstate:v1/userIp": user_ip
"/autoscaler:v1beta2/AutoscalerListResponse": list_autoscaler_response
"/bigquery:v2/AggregateClassificationMetrics": aggregate_classification_metrics
"/bigquery:v2/AggregateClassificationMetrics/accuracy": accuracy
"/bigquery:v2/AggregateClassificationMetrics/f1Score": f1_score
"/bigquery:v2/AggregateClassificationMetrics/logLoss": log_loss
"/bigquery:v2/AggregateClassificationMetrics/precision": precision
"/bigquery:v2/AggregateClassificationMetrics/recall": recall
"/bigquery:v2/AggregateClassificationMetrics/rocAuc": roc_auc
"/bigquery:v2/AggregateClassificationMetrics/threshold": threshold
"/bigquery:v2/BigQueryModelTraining": big_query_model_training
"/bigquery:v2/BigQueryModelTraining/currentIteration": current_iteration
"/bigquery:v2/BigQueryModelTraining/expectedTotalIterations": expected_total_iterations
@ -10924,6 +10932,18 @@
"/bigquery:v2/BigtableOptions/columnFamilies/column_family": column_family
"/bigquery:v2/BigtableOptions/ignoreUnspecifiedColumnFamilies": ignore_unspecified_column_families
"/bigquery:v2/BigtableOptions/readRowkeyAsString": read_rowkey_as_string
"/bigquery:v2/BinaryClassificationMetrics": binary_classification_metrics
"/bigquery:v2/BinaryClassificationMetrics/aggregateClassificationMetrics": aggregate_classification_metrics
"/bigquery:v2/BinaryClassificationMetrics/binaryConfusionMatrixList": binary_confusion_matrix_list
"/bigquery:v2/BinaryClassificationMetrics/binaryConfusionMatrixList/binary_confusion_matrix_list": binary_confusion_matrix_list
"/bigquery:v2/BinaryConfusionMatrix": binary_confusion_matrix
"/bigquery:v2/BinaryConfusionMatrix/falseNegatives": false_negatives
"/bigquery:v2/BinaryConfusionMatrix/falsePositives": false_positives
"/bigquery:v2/BinaryConfusionMatrix/positiveClassThreshold": positive_class_threshold
"/bigquery:v2/BinaryConfusionMatrix/precision": precision
"/bigquery:v2/BinaryConfusionMatrix/recall": recall
"/bigquery:v2/BinaryConfusionMatrix/trueNegatives": true_negatives
"/bigquery:v2/BinaryConfusionMatrix/truePositives": true_positives
"/bigquery:v2/BqmlIterationResult": bqml_iteration_result
"/bigquery:v2/BqmlIterationResult/durationMs": duration_ms
"/bigquery:v2/BqmlIterationResult/evalLoss": eval_loss
@ -10945,9 +10965,20 @@
"/bigquery:v2/BqmlTrainingRun/trainingOptions/maxIteration": max_iteration
"/bigquery:v2/BqmlTrainingRun/trainingOptions/minRelProgress": min_rel_progress
"/bigquery:v2/BqmlTrainingRun/trainingOptions/warmStart": warm_start
"/bigquery:v2/ClusterInfo": cluster_info
"/bigquery:v2/ClusterInfo/centroidId": centroid_id
"/bigquery:v2/ClusterInfo/clusterRadius": cluster_radius
"/bigquery:v2/ClusterInfo/clusterSize": cluster_size
"/bigquery:v2/Clustering": clustering
"/bigquery:v2/Clustering/fields": fields
"/bigquery:v2/Clustering/fields/field": field
"/bigquery:v2/ClusteringMetrics": clustering_metrics
"/bigquery:v2/ClusteringMetrics/daviesBouldinIndex": davies_bouldin_index
"/bigquery:v2/ClusteringMetrics/meanSquaredDistance": mean_squared_distance
"/bigquery:v2/ConfusionMatrix": confusion_matrix
"/bigquery:v2/ConfusionMatrix/confidenceThreshold": confidence_threshold
"/bigquery:v2/ConfusionMatrix/rows": rows
"/bigquery:v2/ConfusionMatrix/rows/row": row
"/bigquery:v2/CsvOptions": csv_options
"/bigquery:v2/CsvOptions/allowJaggedRows": allow_jagged_rows
"/bigquery:v2/CsvOptions/allowQuotedNewlines": allow_quoted_newlines
@ -11002,11 +11033,19 @@
"/bigquery:v2/DestinationTableProperties/labels/label": label
"/bigquery:v2/EncryptionConfiguration": encryption_configuration
"/bigquery:v2/EncryptionConfiguration/kmsKeyName": kms_key_name
"/bigquery:v2/Entry": entry
"/bigquery:v2/Entry/itemCount": item_count
"/bigquery:v2/Entry/predictedLabel": predicted_label
"/bigquery:v2/ErrorProto": error_proto
"/bigquery:v2/ErrorProto/debugInfo": debug_info
"/bigquery:v2/ErrorProto/location": location
"/bigquery:v2/ErrorProto/message": message
"/bigquery:v2/ErrorProto/reason": reason
"/bigquery:v2/EvaluationMetrics": evaluation_metrics
"/bigquery:v2/EvaluationMetrics/binaryClassificationMetrics": binary_classification_metrics
"/bigquery:v2/EvaluationMetrics/clusteringMetrics": clustering_metrics
"/bigquery:v2/EvaluationMetrics/multiClassClassificationMetrics": multi_class_classification_metrics
"/bigquery:v2/EvaluationMetrics/regressionMetrics": regression_metrics
"/bigquery:v2/ExplainQueryStage": explain_query_stage
"/bigquery:v2/ExplainQueryStage/completedParallelInputs": completed_parallel_inputs
"/bigquery:v2/ExplainQueryStage/computeMsAvg": compute_ms_avg
@ -11078,6 +11117,8 @@
"/bigquery:v2/GoogleSheetsOptions/range": range
"/bigquery:v2/GoogleSheetsOptions/skipLeadingRows": skip_leading_rows
"/bigquery:v2/IterationResult": iteration_result
"/bigquery:v2/IterationResult/clusterInfos": cluster_infos
"/bigquery:v2/IterationResult/clusterInfos/cluster_info": cluster_info
"/bigquery:v2/IterationResult/durationMs": duration_ms
"/bigquery:v2/IterationResult/evalLoss": eval_loss
"/bigquery:v2/IterationResult/index": index
@ -11266,10 +11307,32 @@
"/bigquery:v2/JsonObject": json_object
"/bigquery:v2/JsonObject/json_object": json_object
"/bigquery:v2/JsonValue": json_value
"/bigquery:v2/ListModelsResponse": list_models_response
"/bigquery:v2/ListModelsResponse/models": models
"/bigquery:v2/ListModelsResponse/models/model": model
"/bigquery:v2/ListModelsResponse/nextPageToken": next_page_token
"/bigquery:v2/Location": location
"/bigquery:v2/MaterializedViewDefinition": materialized_view_definition
"/bigquery:v2/MaterializedViewDefinition/lastRefreshTime": last_refresh_time
"/bigquery:v2/MaterializedViewDefinition/query": query
"/bigquery:v2/Model": model
"/bigquery:v2/Model/creationTime": creation_time
"/bigquery:v2/Model/description": description
"/bigquery:v2/Model/etag": etag
"/bigquery:v2/Model/expirationTime": expiration_time
"/bigquery:v2/Model/featureColumns": feature_columns
"/bigquery:v2/Model/featureColumns/feature_column": feature_column
"/bigquery:v2/Model/friendlyName": friendly_name
"/bigquery:v2/Model/labelColumns": label_columns
"/bigquery:v2/Model/labelColumns/label_column": label_column
"/bigquery:v2/Model/labels": labels
"/bigquery:v2/Model/labels/label": label
"/bigquery:v2/Model/lastModifiedTime": last_modified_time
"/bigquery:v2/Model/location": location
"/bigquery:v2/Model/modelReference": model_reference
"/bigquery:v2/Model/modelType": model_type
"/bigquery:v2/Model/trainingRuns": training_runs
"/bigquery:v2/Model/trainingRuns/training_run": training_run
"/bigquery:v2/ModelDefinition": model_definition
"/bigquery:v2/ModelDefinition/modelOptions": model_options
"/bigquery:v2/ModelDefinition/modelOptions/labels": labels
@ -11278,6 +11341,14 @@
"/bigquery:v2/ModelDefinition/modelOptions/modelType": model_type
"/bigquery:v2/ModelDefinition/trainingRuns": training_runs
"/bigquery:v2/ModelDefinition/trainingRuns/training_run": training_run
"/bigquery:v2/ModelReference": model_reference
"/bigquery:v2/ModelReference/datasetId": dataset_id
"/bigquery:v2/ModelReference/modelId": model_id
"/bigquery:v2/ModelReference/projectId": project_id
"/bigquery:v2/MultiClassClassificationMetrics": multi_class_classification_metrics
"/bigquery:v2/MultiClassClassificationMetrics/aggregateClassificationMetrics": aggregate_classification_metrics
"/bigquery:v2/MultiClassClassificationMetrics/confusionMatrixList": confusion_matrix_list
"/bigquery:v2/MultiClassClassificationMetrics/confusionMatrixList/confusion_matrix_list": confusion_matrix_list
"/bigquery:v2/ProjectList": project_list
"/bigquery:v2/ProjectList/etag": etag
"/bigquery:v2/ProjectList/kind": kind
@ -11354,10 +11425,30 @@
"/bigquery:v2/RangePartitioning/range/end": end
"/bigquery:v2/RangePartitioning/range/interval": interval
"/bigquery:v2/RangePartitioning/range/start": start
"/bigquery:v2/RegressionMetrics": regression_metrics
"/bigquery:v2/RegressionMetrics/meanAbsoluteError": mean_absolute_error
"/bigquery:v2/RegressionMetrics/meanSquaredError": mean_squared_error
"/bigquery:v2/RegressionMetrics/meanSquaredLogError": mean_squared_log_error
"/bigquery:v2/RegressionMetrics/medianAbsoluteError": median_absolute_error
"/bigquery:v2/RegressionMetrics/rSquared": r_squared
"/bigquery:v2/RoutineReference": routine_reference
"/bigquery:v2/RoutineReference/datasetId": dataset_id
"/bigquery:v2/RoutineReference/projectId": project_id
"/bigquery:v2/RoutineReference/routineId": routine_id
"/bigquery:v2/Row": row
"/bigquery:v2/Row/actualLabel": actual_label
"/bigquery:v2/Row/entries": entries
"/bigquery:v2/Row/entries/entry": entry
"/bigquery:v2/StandardSqlDataType": standard_sql_data_type
"/bigquery:v2/StandardSqlDataType/arrayElementType": array_element_type
"/bigquery:v2/StandardSqlDataType/structType": struct_type
"/bigquery:v2/StandardSqlDataType/typeKind": type_kind
"/bigquery:v2/StandardSqlField": standard_sql_field
"/bigquery:v2/StandardSqlField/name": name
"/bigquery:v2/StandardSqlField/type": type
"/bigquery:v2/StandardSqlStructType": standard_sql_struct_type
"/bigquery:v2/StandardSqlStructType/fields": fields
"/bigquery:v2/StandardSqlStructType/fields/field": field
"/bigquery:v2/Streamingbuffer": streamingbuffer
"/bigquery:v2/Streamingbuffer/estimatedBytes": estimated_bytes
"/bigquery:v2/Streamingbuffer/estimatedRows": estimated_rows
@ -11462,9 +11553,32 @@
"/bigquery:v2/TimePartitioning/field": field
"/bigquery:v2/TimePartitioning/requirePartitionFilter": require_partition_filter
"/bigquery:v2/TimePartitioning/type": type
"/bigquery:v2/TrainingOptions": training_options
"/bigquery:v2/TrainingOptions/dataSplitColumn": data_split_column
"/bigquery:v2/TrainingOptions/dataSplitEvalFraction": data_split_eval_fraction
"/bigquery:v2/TrainingOptions/dataSplitMethod": data_split_method
"/bigquery:v2/TrainingOptions/distanceType": distance_type
"/bigquery:v2/TrainingOptions/earlyStop": early_stop
"/bigquery:v2/TrainingOptions/initialLearnRate": initial_learn_rate
"/bigquery:v2/TrainingOptions/inputLabelColumns": input_label_columns
"/bigquery:v2/TrainingOptions/inputLabelColumns/input_label_column": input_label_column
"/bigquery:v2/TrainingOptions/l1Regularization": l1_regularization
"/bigquery:v2/TrainingOptions/l2Regularization": l2_regularization
"/bigquery:v2/TrainingOptions/labelClassWeights": label_class_weights
"/bigquery:v2/TrainingOptions/labelClassWeights/label_class_weight": label_class_weight
"/bigquery:v2/TrainingOptions/learnRate": learn_rate
"/bigquery:v2/TrainingOptions/learnRateStrategy": learn_rate_strategy
"/bigquery:v2/TrainingOptions/lossType": loss_type
"/bigquery:v2/TrainingOptions/maxIterations": max_iterations
"/bigquery:v2/TrainingOptions/minRelativeProgress": min_relative_progress
"/bigquery:v2/TrainingOptions/numClusters": num_clusters
"/bigquery:v2/TrainingOptions/warmStart": warm_start
"/bigquery:v2/TrainingRun": training_run
"/bigquery:v2/TrainingRun/evaluationMetrics": evaluation_metrics
"/bigquery:v2/TrainingRun/iterationResults": iteration_results
"/bigquery:v2/TrainingRun/iterationResults/iteration_result": iteration_result
"/bigquery:v2/TrainingRun/results": results
"/bigquery:v2/TrainingRun/results/result": result
"/bigquery:v2/TrainingRun/startTime": start_time
"/bigquery:v2/TrainingRun/state": state
"/bigquery:v2/TrainingRun/trainingOptions": training_options
@ -11536,6 +11650,23 @@
"/bigquery:v2/bigquery.jobs.list/stateFilter": state_filter
"/bigquery:v2/bigquery.jobs.query": query_job
"/bigquery:v2/bigquery.jobs.query/projectId": project_id
"/bigquery:v2/bigquery.models.delete": delete_model
"/bigquery:v2/bigquery.models.delete/datasetId": dataset_id
"/bigquery:v2/bigquery.models.delete/modelId": model_id
"/bigquery:v2/bigquery.models.delete/projectId": project_id
"/bigquery:v2/bigquery.models.get": get_model
"/bigquery:v2/bigquery.models.get/datasetId": dataset_id
"/bigquery:v2/bigquery.models.get/modelId": model_id
"/bigquery:v2/bigquery.models.get/projectId": project_id
"/bigquery:v2/bigquery.models.list": list_models
"/bigquery:v2/bigquery.models.list/datasetId": dataset_id
"/bigquery:v2/bigquery.models.list/maxResults": max_results
"/bigquery:v2/bigquery.models.list/pageToken": page_token
"/bigquery:v2/bigquery.models.list/projectId": project_id
"/bigquery:v2/bigquery.models.patch": patch_model
"/bigquery:v2/bigquery.models.patch/datasetId": dataset_id
"/bigquery:v2/bigquery.models.patch/modelId": model_id
"/bigquery:v2/bigquery.models.patch/projectId": project_id
"/bigquery:v2/bigquery.projects.getServiceAccount": get_project_service_account
"/bigquery:v2/bigquery.projects.getServiceAccount/projectId": project_id
"/bigquery:v2/bigquery.projects.list": list_projects

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/bigquery/
module BigqueryV2
VERSION = 'V2'
REVISION = '20190308'
REVISION = '20190314'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'

View File

@ -22,6 +22,74 @@ module Google
module Apis
module BigqueryV2
# Aggregate metrics for classification models. For multi-class models,
# the metrics are either macro-averaged: metrics are calculated for each
# label and then an unweighted average is taken of those values or
# micro-averaged: the metric is calculated globally by counting the total
# number of correctly predicted rows.
class AggregateClassificationMetrics
include Google::Apis::Core::Hashable
# Accuracy is the fraction of predictions given the correct label. For
# multiclass this is a micro-averaged metric.
# Corresponds to the JSON property `accuracy`
# @return [Float]
attr_accessor :accuracy
# The F1 score is an average of recall and precision. For multiclass
# this is a macro-averaged metric.
# Corresponds to the JSON property `f1Score`
# @return [Float]
attr_accessor :f1_score
# Logarithmic Loss. For multiclass this is a macro-averaged metric.
# Corresponds to the JSON property `logLoss`
# @return [Float]
attr_accessor :log_loss
# 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.
# Corresponds to the JSON property `precision`
# @return [Float]
attr_accessor :precision
# Recall is the fraction of actual positive labels that were given a
# positive prediction. For multiclass this is a macro-averaged metric.
# Corresponds to the JSON property `recall`
# @return [Float]
attr_accessor :recall
# Area Under a ROC Curve. For multiclass this is a macro-averaged
# metric.
# Corresponds to the JSON property `rocAuc`
# @return [Float]
attr_accessor :roc_auc
# 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.
# Corresponds to the JSON property `threshold`
# @return [Float]
attr_accessor :threshold
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accuracy = args[:accuracy] if args.key?(:accuracy)
@f1_score = args[:f1_score] if args.key?(:f1_score)
@log_loss = args[:log_loss] if args.key?(:log_loss)
@precision = args[:precision] if args.key?(:precision)
@recall = args[:recall] if args.key?(:recall)
@roc_auc = args[:roc_auc] if args.key?(:roc_auc)
@threshold = args[:threshold] if args.key?(:threshold)
end
end
#
class BigQueryModelTraining
include Google::Apis::Core::Hashable
@ -223,6 +291,90 @@ module Google
end
end
# Evaluation metrics for binary classification models.
class BinaryClassificationMetrics
include Google::Apis::Core::Hashable
# Aggregate metrics for classification models. For multi-class models,
# the metrics are either macro-averaged: metrics are calculated for each
# label and then an unweighted average is taken of those values or
# micro-averaged: the metric is calculated globally by counting the total
# number of correctly predicted rows.
# Corresponds to the JSON property `aggregateClassificationMetrics`
# @return [Google::Apis::BigqueryV2::AggregateClassificationMetrics]
attr_accessor :aggregate_classification_metrics
# Binary confusion matrix at multiple thresholds.
# Corresponds to the JSON property `binaryConfusionMatrixList`
# @return [Array<Google::Apis::BigqueryV2::BinaryConfusionMatrix>]
attr_accessor :binary_confusion_matrix_list
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregate_classification_metrics = args[:aggregate_classification_metrics] if args.key?(:aggregate_classification_metrics)
@binary_confusion_matrix_list = args[:binary_confusion_matrix_list] if args.key?(:binary_confusion_matrix_list)
end
end
# Confusion matrix for binary classification models.
class BinaryConfusionMatrix
include Google::Apis::Core::Hashable
# Number of false samples predicted as false.
# Corresponds to the JSON property `falseNegatives`
# @return [Fixnum]
attr_accessor :false_negatives
# Number of false samples predicted as true.
# Corresponds to the JSON property `falsePositives`
# @return [Fixnum]
attr_accessor :false_positives
# Threshold value used when computing each of the following metric.
# Corresponds to the JSON property `positiveClassThreshold`
# @return [Float]
attr_accessor :positive_class_threshold
# Aggregate precision.
# Corresponds to the JSON property `precision`
# @return [Float]
attr_accessor :precision
# Aggregate recall.
# Corresponds to the JSON property `recall`
# @return [Float]
attr_accessor :recall
# Number of true samples predicted as false.
# Corresponds to the JSON property `trueNegatives`
# @return [Fixnum]
attr_accessor :true_negatives
# Number of true samples predicted as true.
# Corresponds to the JSON property `truePositives`
# @return [Fixnum]
attr_accessor :true_positives
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@false_negatives = args[:false_negatives] if args.key?(:false_negatives)
@false_positives = args[:false_positives] if args.key?(:false_positives)
@positive_class_threshold = args[:positive_class_threshold] if args.key?(:positive_class_threshold)
@precision = args[:precision] if args.key?(:precision)
@recall = args[:recall] if args.key?(:recall)
@true_negatives = args[:true_negatives] if args.key?(:true_negatives)
@true_positives = args[:true_positives] if args.key?(:true_positives)
end
end
#
class BqmlIterationResult
include Google::Apis::Core::Hashable
@ -389,6 +541,38 @@ module Google
end
end
# Information about a single cluster for clustering model.
class ClusterInfo
include Google::Apis::Core::Hashable
# Centroid id.
# Corresponds to the JSON property `centroidId`
# @return [Fixnum]
attr_accessor :centroid_id
# Cluster radius, the average distance from centroid
# to each point assigned to the cluster.
# Corresponds to the JSON property `clusterRadius`
# @return [Float]
attr_accessor :cluster_radius
# Cluster size, the total number of points assigned to the cluster.
# Corresponds to the JSON property `clusterSize`
# @return [Fixnum]
attr_accessor :cluster_size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@centroid_id = args[:centroid_id] if args.key?(:centroid_id)
@cluster_radius = args[:cluster_radius] if args.key?(:cluster_radius)
@cluster_size = args[:cluster_size] if args.key?(:cluster_size)
end
end
#
class Clustering
include Google::Apis::Core::Hashable
@ -411,6 +595,57 @@ module Google
end
end
# Evaluation metrics for clustering models.
class ClusteringMetrics
include Google::Apis::Core::Hashable
# Davies-Bouldin index.
# Corresponds to the JSON property `daviesBouldinIndex`
# @return [Float]
attr_accessor :davies_bouldin_index
# Mean of squared distances between each sample to its cluster centroid.
# Corresponds to the JSON property `meanSquaredDistance`
# @return [Float]
attr_accessor :mean_squared_distance
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@davies_bouldin_index = args[:davies_bouldin_index] if args.key?(:davies_bouldin_index)
@mean_squared_distance = args[:mean_squared_distance] if args.key?(:mean_squared_distance)
end
end
# Confusion matrix for multi-class classification models.
class ConfusionMatrix
include Google::Apis::Core::Hashable
# Confidence threshold used when computing the entries of the
# confusion matrix.
# Corresponds to the JSON property `confidenceThreshold`
# @return [Float]
attr_accessor :confidence_threshold
# One row per actual label.
# Corresponds to the JSON property `rows`
# @return [Array<Google::Apis::BigqueryV2::Row>]
attr_accessor :rows
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
@rows = args[:rows] if args.key?(:rows)
end
end
#
class CsvOptions
include Google::Apis::Core::Hashable
@ -867,6 +1102,33 @@ module Google
end
end
# A single entry in the confusion matrix.
class Entry
include Google::Apis::Core::Hashable
# Number of items being predicted as this label.
# Corresponds to the JSON property `itemCount`
# @return [Fixnum]
attr_accessor :item_count
# The predicted label. For confidence_threshold > 0, we will
# also add an entry indicating the number of items under the
# confidence threshold.
# Corresponds to the JSON property `predictedLabel`
# @return [String]
attr_accessor :predicted_label
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@item_count = args[:item_count] if args.key?(:item_count)
@predicted_label = args[:predicted_label] if args.key?(:predicted_label)
end
end
#
class ErrorProto
include Google::Apis::Core::Hashable
@ -905,6 +1167,45 @@ module Google
end
end
# 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.
class EvaluationMetrics
include Google::Apis::Core::Hashable
# Evaluation metrics for binary classification models.
# Corresponds to the JSON property `binaryClassificationMetrics`
# @return [Google::Apis::BigqueryV2::BinaryClassificationMetrics]
attr_accessor :binary_classification_metrics
# Evaluation metrics for clustering models.
# Corresponds to the JSON property `clusteringMetrics`
# @return [Google::Apis::BigqueryV2::ClusteringMetrics]
attr_accessor :clustering_metrics
# Evaluation metrics for multi-class classification models.
# Corresponds to the JSON property `multiClassClassificationMetrics`
# @return [Google::Apis::BigqueryV2::MultiClassClassificationMetrics]
attr_accessor :multi_class_classification_metrics
# Evaluation metrics for regression models.
# Corresponds to the JSON property `regressionMetrics`
# @return [Google::Apis::BigqueryV2::RegressionMetrics]
attr_accessor :regression_metrics
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binary_classification_metrics = args[:binary_classification_metrics] if args.key?(:binary_classification_metrics)
@clustering_metrics = args[:clustering_metrics] if args.key?(:clustering_metrics)
@multi_class_classification_metrics = args[:multi_class_classification_metrics] if args.key?(:multi_class_classification_metrics)
@regression_metrics = args[:regression_metrics] if args.key?(:regression_metrics)
end
end
#
class ExplainQueryStage
include Google::Apis::Core::Hashable
@ -1394,6 +1695,55 @@ module Google
end
end
# Information about a single iteration of the training run.
class IterationResult
include Google::Apis::Core::Hashable
# [Beta] Information about top clusters for clustering models.
# Corresponds to the JSON property `clusterInfos`
# @return [Array<Google::Apis::BigqueryV2::ClusterInfo>]
attr_accessor :cluster_infos
# Time taken to run the iteration in milliseconds.
# Corresponds to the JSON property `durationMs`
# @return [Fixnum]
attr_accessor :duration_ms
# Loss computed on the eval data at the end of iteration.
# Corresponds to the JSON property `evalLoss`
# @return [Float]
attr_accessor :eval_loss
# Index of the iteration, 0 based.
# Corresponds to the JSON property `index`
# @return [Fixnum]
attr_accessor :index
# Learn rate used for this iteration.
# Corresponds to the JSON property `learnRate`
# @return [Float]
attr_accessor :learn_rate
# Loss computed on the training data at the end of iteration.
# Corresponds to the JSON property `trainingLoss`
# @return [Float]
attr_accessor :training_loss
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster_infos = args[:cluster_infos] if args.key?(:cluster_infos)
@duration_ms = args[:duration_ms] if args.key?(:duration_ms)
@eval_loss = args[:eval_loss] if args.key?(:eval_loss)
@index = args[:index] if args.key?(:index)
@learn_rate = args[:learn_rate] if args.key?(:learn_rate)
@training_loss = args[:training_loss] if args.key?(:training_loss)
end
end
#
class Job
include Google::Apis::Core::Hashable
@ -2720,6 +3070,33 @@ module Google
end
end
#
class ListModelsResponse
include Google::Apis::Core::Hashable
# Models in the requested dataset. Only the following fields are populated:
# model_reference, model_type, creation_time, last_modified_time and
# labels.
# Corresponds to the JSON property `models`
# @return [Array<Google::Apis::BigqueryV2::Model>]
attr_accessor :models
# A token to request the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@models = args[:models] if args.key?(:models)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
#
class MaterializedViewDefinition
include Google::Apis::Core::Hashable
@ -2746,6 +3123,115 @@ module Google
end
end
#
class Model
include Google::Apis::Core::Hashable
# Output only. The time when this model was created, in millisecs since the
# epoch.
# Corresponds to the JSON property `creationTime`
# @return [Fixnum]
attr_accessor :creation_time
# [Optional] A user-friendly description of this model.
# @mutable bigquery.models.patch
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Output only. A hash of this resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# [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.
# @mutable bigquery.models.patch
# Corresponds to the JSON property `expirationTime`
# @return [Fixnum]
attr_accessor :expiration_time
# Output only. Input feature columns that were used to train this model.
# Corresponds to the JSON property `featureColumns`
# @return [Array<Google::Apis::BigqueryV2::StandardSqlField>]
attr_accessor :feature_columns
# [Optional] A descriptive name for this model.
# @mutable bigquery.models.patch
# Corresponds to the JSON property `friendlyName`
# @return [String]
attr_accessor :friendly_name
# Output only. Label columns that were used to train this model.
# The output of the model will have a “predicted_” prefix to these columns.
# Corresponds to the JSON property `labelColumns`
# @return [Array<Google::Apis::BigqueryV2::StandardSqlField>]
attr_accessor :label_columns
# [Optional] 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.
# @mutable bigquery.models.patch
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Output only. The time when this model was last modified, in millisecs
# since the epoch.
# Corresponds to the JSON property `lastModifiedTime`
# @return [Fixnum]
attr_accessor :last_modified_time
# Output only. The geographic location where the model resides. This value
# is inherited from the dataset.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# Id path of a model.
# Corresponds to the JSON property `modelReference`
# @return [Google::Apis::BigqueryV2::ModelReference]
attr_accessor :model_reference
# Output only. Type of the model resource.
# Corresponds to the JSON property `modelType`
# @return [String]
attr_accessor :model_type
# Output only. Information for all training runs in increasing order of
# start_time.
# Corresponds to the JSON property `trainingRuns`
# @return [Array<Google::Apis::BigqueryV2::TrainingRun>]
attr_accessor :training_runs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_time = args[:creation_time] if args.key?(:creation_time)
@description = args[:description] if args.key?(:description)
@etag = args[:etag] if args.key?(:etag)
@expiration_time = args[:expiration_time] if args.key?(:expiration_time)
@feature_columns = args[:feature_columns] if args.key?(:feature_columns)
@friendly_name = args[:friendly_name] if args.key?(:friendly_name)
@label_columns = args[:label_columns] if args.key?(:label_columns)
@labels = args[:labels] if args.key?(:labels)
@last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
@location = args[:location] if args.key?(:location)
@model_reference = args[:model_reference] if args.key?(:model_reference)
@model_type = args[:model_type] if args.key?(:model_type)
@training_runs = args[:training_runs] if args.key?(:training_runs)
end
end
#
class ModelDefinition
include Google::Apis::Core::Hashable
@ -2809,6 +3295,68 @@ module Google
end
end
# Id path of a model.
class ModelReference
include Google::Apis::Core::Hashable
# [Required] The ID of the dataset containing this model.
# Corresponds to the JSON property `datasetId`
# @return [String]
attr_accessor :dataset_id
# [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.
# Corresponds to the JSON property `modelId`
# @return [String]
attr_accessor :model_id
# [Required] The ID of the project containing this model.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@dataset_id = args[:dataset_id] if args.key?(:dataset_id)
@model_id = args[:model_id] if args.key?(:model_id)
@project_id = args[:project_id] if args.key?(:project_id)
end
end
# Evaluation metrics for multi-class classification models.
class MultiClassClassificationMetrics
include Google::Apis::Core::Hashable
# Aggregate metrics for classification models. For multi-class models,
# the metrics are either macro-averaged: metrics are calculated for each
# label and then an unweighted average is taken of those values or
# micro-averaged: the metric is calculated globally by counting the total
# number of correctly predicted rows.
# Corresponds to the JSON property `aggregateClassificationMetrics`
# @return [Google::Apis::BigqueryV2::AggregateClassificationMetrics]
attr_accessor :aggregate_classification_metrics
# Confusion matrix at different thresholds.
# Corresponds to the JSON property `confusionMatrixList`
# @return [Array<Google::Apis::BigqueryV2::ConfusionMatrix>]
attr_accessor :confusion_matrix_list
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregate_classification_metrics = args[:aggregate_classification_metrics] if args.key?(:aggregate_classification_metrics)
@confusion_matrix_list = args[:confusion_matrix_list] if args.key?(:confusion_matrix_list)
end
end
#
class ProjectList
include Google::Apis::Core::Hashable
@ -3351,6 +3899,49 @@ module Google
end
end
# Evaluation metrics for regression models.
class RegressionMetrics
include Google::Apis::Core::Hashable
# Mean absolute error.
# Corresponds to the JSON property `meanAbsoluteError`
# @return [Float]
attr_accessor :mean_absolute_error
# Mean squared error.
# Corresponds to the JSON property `meanSquaredError`
# @return [Float]
attr_accessor :mean_squared_error
# Mean squared log error.
# Corresponds to the JSON property `meanSquaredLogError`
# @return [Float]
attr_accessor :mean_squared_log_error
# Median absolute error.
# Corresponds to the JSON property `medianAbsoluteError`
# @return [Float]
attr_accessor :median_absolute_error
# R^2 score.
# Corresponds to the JSON property `rSquared`
# @return [Float]
attr_accessor :r_squared
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
@mean_squared_error = args[:mean_squared_error] if args.key?(:mean_squared_error)
@mean_squared_log_error = args[:mean_squared_log_error] if args.key?(:mean_squared_log_error)
@median_absolute_error = args[:median_absolute_error] if args.key?(:median_absolute_error)
@r_squared = args[:r_squared] if args.key?(:r_squared)
end
end
#
class RoutineReference
include Google::Apis::Core::Hashable
@ -3383,6 +3974,134 @@ module Google
end
end
# A single row in the confusion matrix.
class Row
include Google::Apis::Core::Hashable
# The original label of this row.
# Corresponds to the JSON property `actualLabel`
# @return [String]
attr_accessor :actual_label
# Info describing predicted label distribution.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::BigqueryV2::Entry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@actual_label = args[:actual_label] if args.key?(:actual_label)
@entries = args[:entries] if args.key?(:entries)
end
end
# The type of a variable, e.g., a function argument.
# Examples:
# INT64: `type_kind="INT64"`
# ARRAY<STRING>: `type_kind="ARRAY", array_element_type="STRING"`
# STRUCT<x STRING, y ARRAY<DATE>>:
# `type_kind="STRUCT",
# struct_type=`fields=[
# `name="x", type=`type_kind="STRING"``,
# `name="y", type=`type_kind="ARRAY", array_element_type="DATE"``
# ]``
class StandardSqlDataType
include Google::Apis::Core::Hashable
# The type of a variable, e.g., a function argument.
# Examples:
# INT64: `type_kind="INT64"`
# ARRAY<STRING>: `type_kind="ARRAY", array_element_type="STRING"`
# STRUCT<x STRING, y ARRAY<DATE>>:
# `type_kind="STRUCT",
# struct_type=`fields=[
# `name="x", type=`type_kind="STRING"``,
# `name="y", type=`type_kind="ARRAY", array_element_type="DATE"``
# ]``
# Corresponds to the JSON property `arrayElementType`
# @return [Google::Apis::BigqueryV2::StandardSqlDataType]
attr_accessor :array_element_type
# The fields of this struct, in order, if type_kind = "STRUCT".
# Corresponds to the JSON property `structType`
# @return [Google::Apis::BigqueryV2::StandardSqlStructType]
attr_accessor :struct_type
# Required. The top level type of this field.
# Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
# Corresponds to the JSON property `typeKind`
# @return [String]
attr_accessor :type_kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@array_element_type = args[:array_element_type] if args.key?(:array_element_type)
@struct_type = args[:struct_type] if args.key?(:struct_type)
@type_kind = args[:type_kind] if args.key?(:type_kind)
end
end
# A field or a column.
class StandardSqlField
include Google::Apis::Core::Hashable
# Optional. The name of this field. Can be absent for struct fields.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The type of a variable, e.g., a function argument.
# Examples:
# INT64: `type_kind="INT64"`
# ARRAY<STRING>: `type_kind="ARRAY", array_element_type="STRING"`
# STRUCT<x STRING, y ARRAY<DATE>>:
# `type_kind="STRUCT",
# struct_type=`fields=[
# `name="x", type=`type_kind="STRING"``,
# `name="y", type=`type_kind="ARRAY", array_element_type="DATE"``
# ]``
# Corresponds to the JSON property `type`
# @return [Google::Apis::BigqueryV2::StandardSqlDataType]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@type = args[:type] if args.key?(:type)
end
end
#
class StandardSqlStructType
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `fields`
# @return [Array<Google::Apis::BigqueryV2::StandardSqlField>]
attr_accessor :fields
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@fields = args[:fields] if args.key?(:fields)
end
end
#
class Streamingbuffer
include Google::Apis::Core::Hashable
@ -4164,6 +4883,179 @@ module Google
end
end
#
class TrainingOptions
include Google::Apis::Core::Hashable
# 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
# Corresponds to the JSON property `dataSplitColumn`
# @return [String]
attr_accessor :data_split_column
# 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.
# Corresponds to the JSON property `dataSplitEvalFraction`
# @return [Float]
attr_accessor :data_split_eval_fraction
# The data split type for training and evaluation, e.g. RANDOM.
# Corresponds to the JSON property `dataSplitMethod`
# @return [String]
attr_accessor :data_split_method
# [Beta] Distance type for clustering models.
# Corresponds to the JSON property `distanceType`
# @return [String]
attr_accessor :distance_type
# Whether to stop early when the loss doesn't improve significantly
# any more (compared to min_relative_progress).
# Corresponds to the JSON property `earlyStop`
# @return [Boolean]
attr_accessor :early_stop
alias_method :early_stop?, :early_stop
# Specifies the initial learning rate for line search to start at.
# Corresponds to the JSON property `initialLearnRate`
# @return [Float]
attr_accessor :initial_learn_rate
# Name of input label columns in training data.
# Corresponds to the JSON property `inputLabelColumns`
# @return [Array<String>]
attr_accessor :input_label_columns
# L1 regularization coefficient.
# Corresponds to the JSON property `l1Regularization`
# @return [Float]
attr_accessor :l1_regularization
# L2 regularization coefficient.
# Corresponds to the JSON property `l2Regularization`
# @return [Float]
attr_accessor :l2_regularization
# Weights associated with each label class, for rebalancing the
# training data.
# Corresponds to the JSON property `labelClassWeights`
# @return [Hash<String,Float>]
attr_accessor :label_class_weights
# Learning rate in training.
# Corresponds to the JSON property `learnRate`
# @return [Float]
attr_accessor :learn_rate
# The strategy to determine learning rate.
# Corresponds to the JSON property `learnRateStrategy`
# @return [String]
attr_accessor :learn_rate_strategy
# Type of loss function used during training run.
# Corresponds to the JSON property `lossType`
# @return [String]
attr_accessor :loss_type
# The maximum number of iterations in training.
# Corresponds to the JSON property `maxIterations`
# @return [Fixnum]
attr_accessor :max_iterations
# When early_stop is true, stops training when accuracy improvement is
# less than 'min_relative_progress'.
# Corresponds to the JSON property `minRelativeProgress`
# @return [Float]
attr_accessor :min_relative_progress
# [Beta] Number of clusters for clustering models.
# Corresponds to the JSON property `numClusters`
# @return [Fixnum]
attr_accessor :num_clusters
# Whether to train a model from the last checkpoint.
# Corresponds to the JSON property `warmStart`
# @return [Boolean]
attr_accessor :warm_start
alias_method :warm_start?, :warm_start
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@data_split_column = args[:data_split_column] if args.key?(:data_split_column)
@data_split_eval_fraction = args[:data_split_eval_fraction] if args.key?(:data_split_eval_fraction)
@data_split_method = args[:data_split_method] if args.key?(:data_split_method)
@distance_type = args[:distance_type] if args.key?(:distance_type)
@early_stop = args[:early_stop] if args.key?(:early_stop)
@initial_learn_rate = args[:initial_learn_rate] if args.key?(:initial_learn_rate)
@input_label_columns = args[:input_label_columns] if args.key?(:input_label_columns)
@l1_regularization = args[:l1_regularization] if args.key?(:l1_regularization)
@l2_regularization = args[:l2_regularization] if args.key?(:l2_regularization)
@label_class_weights = args[:label_class_weights] if args.key?(:label_class_weights)
@learn_rate = args[:learn_rate] if args.key?(:learn_rate)
@learn_rate_strategy = args[:learn_rate_strategy] if args.key?(:learn_rate_strategy)
@loss_type = args[:loss_type] if args.key?(:loss_type)
@max_iterations = args[:max_iterations] if args.key?(:max_iterations)
@min_relative_progress = args[:min_relative_progress] if args.key?(:min_relative_progress)
@num_clusters = args[:num_clusters] if args.key?(:num_clusters)
@warm_start = args[:warm_start] if args.key?(:warm_start)
end
end
# Information about a single training query run for the model.
class TrainingRun
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `evaluationMetrics`
# @return [Google::Apis::BigqueryV2::EvaluationMetrics]
attr_accessor :evaluation_metrics
# Output of each iteration run, results.size() <= max_iterations.
# Corresponds to the JSON property `results`
# @return [Array<Google::Apis::BigqueryV2::IterationResult>]
attr_accessor :results
# The start time of this training run.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Options that were used for this training run, includes
# user specified and default options that were used.
# Corresponds to the JSON property `trainingOptions`
# @return [Google::Apis::BigqueryV2::TrainingOptions]
attr_accessor :training_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@evaluation_metrics = args[:evaluation_metrics] if args.key?(:evaluation_metrics)
@results = args[:results] if args.key?(:results)
@start_time = args[:start_time] if args.key?(:start_time)
@training_options = args[:training_options] if args.key?(:training_options)
end
end
#
class UserDefinedFunctionResource
include Google::Apis::Core::Hashable

View File

@ -22,6 +22,12 @@ module Google
module Apis
module BigqueryV2
class AggregateClassificationMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BigQueryModelTraining
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -46,6 +52,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class BinaryClassificationMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BinaryConfusionMatrix
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BqmlIterationResult
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -64,12 +82,30 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ClusterInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Clustering
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClusteringMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ConfusionMatrix
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CsvOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -118,12 +154,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Entry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ErrorProto
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EvaluationMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ExplainQueryStage
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -160,6 +208,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class IterationResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -262,12 +316,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListModelsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MaterializedViewDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Model
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ModelDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -280,6 +346,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ModelReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MultiClassClassificationMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectList
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -352,12 +430,42 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class RegressionMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RoutineReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Row
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StandardSqlDataType
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StandardSqlField
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StandardSqlStructType
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Streamingbuffer
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -460,6 +568,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TrainingOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TrainingRun
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UserDefinedFunctionResource
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -472,6 +592,19 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AggregateClassificationMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :accuracy, as: 'accuracy'
property :f1_score, as: 'f1Score'
property :log_loss, as: 'logLoss'
property :precision, as: 'precision'
property :recall, as: 'recall'
property :roc_auc, as: 'rocAuc'
property :threshold, as: 'threshold'
end
end
class BigQueryModelTraining
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -514,6 +647,29 @@ module Google
end
end
class BinaryClassificationMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :aggregate_classification_metrics, as: 'aggregateClassificationMetrics', class: Google::Apis::BigqueryV2::AggregateClassificationMetrics, decorator: Google::Apis::BigqueryV2::AggregateClassificationMetrics::Representation
collection :binary_confusion_matrix_list, as: 'binaryConfusionMatrixList', class: Google::Apis::BigqueryV2::BinaryConfusionMatrix, decorator: Google::Apis::BigqueryV2::BinaryConfusionMatrix::Representation
end
end
class BinaryConfusionMatrix
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :false_negatives, :numeric_string => true, as: 'falseNegatives'
property :false_positives, :numeric_string => true, as: 'falsePositives'
property :positive_class_threshold, as: 'positiveClassThreshold'
property :precision, as: 'precision'
property :recall, as: 'recall'
property :true_negatives, :numeric_string => true, as: 'trueNegatives'
property :true_positives, :numeric_string => true, as: 'truePositives'
end
end
class BqmlIterationResult
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -553,6 +709,15 @@ module Google
end
end
class ClusterInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :centroid_id, :numeric_string => true, as: 'centroidId'
property :cluster_radius, as: 'clusterRadius'
property :cluster_size, :numeric_string => true, as: 'clusterSize'
end
end
class Clustering
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -560,6 +725,23 @@ module Google
end
end
class ClusteringMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :davies_bouldin_index, as: 'daviesBouldinIndex'
property :mean_squared_distance, as: 'meanSquaredDistance'
end
end
class ConfusionMatrix
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :confidence_threshold, as: 'confidenceThreshold'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::Row, decorator: Google::Apis::BigqueryV2::Row::Representation
end
end
class CsvOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -656,6 +838,14 @@ module Google
end
end
class Entry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :item_count, :numeric_string => true, as: 'itemCount'
property :predicted_label, as: 'predictedLabel'
end
end
class ErrorProto
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -666,6 +856,20 @@ module Google
end
end
class EvaluationMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :binary_classification_metrics, as: 'binaryClassificationMetrics', class: Google::Apis::BigqueryV2::BinaryClassificationMetrics, decorator: Google::Apis::BigqueryV2::BinaryClassificationMetrics::Representation
property :clustering_metrics, as: 'clusteringMetrics', class: Google::Apis::BigqueryV2::ClusteringMetrics, decorator: Google::Apis::BigqueryV2::ClusteringMetrics::Representation
property :multi_class_classification_metrics, as: 'multiClassClassificationMetrics', class: Google::Apis::BigqueryV2::MultiClassClassificationMetrics, decorator: Google::Apis::BigqueryV2::MultiClassClassificationMetrics::Representation
property :regression_metrics, as: 'regressionMetrics', class: Google::Apis::BigqueryV2::RegressionMetrics, decorator: Google::Apis::BigqueryV2::RegressionMetrics::Representation
end
end
class ExplainQueryStage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -769,6 +973,19 @@ module Google
end
end
class IterationResult
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :cluster_infos, as: 'clusterInfos', class: Google::Apis::BigqueryV2::ClusterInfo, decorator: Google::Apis::BigqueryV2::ClusterInfo::Representation
property :duration_ms, :numeric_string => true, as: 'durationMs'
property :eval_loss, as: 'evalLoss'
property :index, as: 'index'
property :learn_rate, as: 'learnRate'
property :training_loss, as: 'trainingLoss'
end
end
class Job
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1068,6 +1285,15 @@ module Google
end
end
class ListModelsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :models, as: 'models', class: Google::Apis::BigqueryV2::Model, decorator: Google::Apis::BigqueryV2::Model::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class MaterializedViewDefinition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1076,6 +1302,29 @@ module Google
end
end
class Model
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_time, :numeric_string => true, as: 'creationTime'
property :description, as: 'description'
property :etag, as: 'etag'
property :expiration_time, :numeric_string => true, as: 'expirationTime'
collection :feature_columns, as: 'featureColumns', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation
property :friendly_name, as: 'friendlyName'
collection :label_columns, as: 'labelColumns', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation
hash :labels, as: 'labels'
property :last_modified_time, :numeric_string => true, as: 'lastModifiedTime'
property :location, as: 'location'
property :model_reference, as: 'modelReference', class: Google::Apis::BigqueryV2::ModelReference, decorator: Google::Apis::BigqueryV2::ModelReference::Representation
property :model_type, as: 'modelType'
collection :training_runs, as: 'trainingRuns', class: Google::Apis::BigqueryV2::TrainingRun, decorator: Google::Apis::BigqueryV2::TrainingRun::Representation
end
end
class ModelDefinition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1095,6 +1344,25 @@ module Google
end
end
class ModelReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :model_id, as: 'modelId'
property :project_id, as: 'projectId'
end
end
class MultiClassClassificationMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :aggregate_classification_metrics, as: 'aggregateClassificationMetrics', class: Google::Apis::BigqueryV2::AggregateClassificationMetrics, decorator: Google::Apis::BigqueryV2::AggregateClassificationMetrics::Representation
collection :confusion_matrix_list, as: 'confusionMatrixList', class: Google::Apis::BigqueryV2::ConfusionMatrix, decorator: Google::Apis::BigqueryV2::ConfusionMatrix::Representation
end
end
class ProjectList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1239,6 +1507,17 @@ module Google
end
end
class RegressionMetrics
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :mean_absolute_error, as: 'meanAbsoluteError'
property :mean_squared_error, as: 'meanSquaredError'
property :mean_squared_log_error, as: 'meanSquaredLogError'
property :median_absolute_error, as: 'medianAbsoluteError'
property :r_squared, as: 'rSquared'
end
end
class RoutineReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1248,6 +1527,43 @@ module Google
end
end
class Row
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :actual_label, as: 'actualLabel'
collection :entries, as: 'entries', class: Google::Apis::BigqueryV2::Entry, decorator: Google::Apis::BigqueryV2::Entry::Representation
end
end
class StandardSqlDataType
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :array_element_type, as: 'arrayElementType', class: Google::Apis::BigqueryV2::StandardSqlDataType, decorator: Google::Apis::BigqueryV2::StandardSqlDataType::Representation
property :struct_type, as: 'structType', class: Google::Apis::BigqueryV2::StandardSqlStructType, decorator: Google::Apis::BigqueryV2::StandardSqlStructType::Representation
property :type_kind, as: 'typeKind'
end
end
class StandardSqlField
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :type, as: 'type', class: Google::Apis::BigqueryV2::StandardSqlDataType, decorator: Google::Apis::BigqueryV2::StandardSqlDataType::Representation
end
end
class StandardSqlStructType
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation
end
end
class Streamingbuffer
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1455,6 +1771,42 @@ module Google
end
end
class TrainingOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :data_split_column, as: 'dataSplitColumn'
property :data_split_eval_fraction, as: 'dataSplitEvalFraction'
property :data_split_method, as: 'dataSplitMethod'
property :distance_type, as: 'distanceType'
property :early_stop, as: 'earlyStop'
property :initial_learn_rate, as: 'initialLearnRate'
collection :input_label_columns, as: 'inputLabelColumns'
property :l1_regularization, as: 'l1Regularization'
property :l2_regularization, as: 'l2Regularization'
hash :label_class_weights, as: 'labelClassWeights'
property :learn_rate, as: 'learnRate'
property :learn_rate_strategy, as: 'learnRateStrategy'
property :loss_type, as: 'lossType'
property :max_iterations, :numeric_string => true, as: 'maxIterations'
property :min_relative_progress, as: 'minRelativeProgress'
property :num_clusters, :numeric_string => true, as: 'numClusters'
property :warm_start, as: 'warmStart'
end
end
class TrainingRun
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :evaluation_metrics, as: 'evaluationMetrics', class: Google::Apis::BigqueryV2::EvaluationMetrics, decorator: Google::Apis::BigqueryV2::EvaluationMetrics::Representation
collection :results, as: 'results', class: Google::Apis::BigqueryV2::IterationResult, decorator: Google::Apis::BigqueryV2::IterationResult::Representation
property :start_time, as: 'startTime'
property :training_options, as: 'trainingOptions', class: Google::Apis::BigqueryV2::TrainingOptions, decorator: Google::Apis::BigqueryV2::TrainingOptions::Representation
end
end
class UserDefinedFunctionResource
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -577,6 +577,168 @@ module Google
execute_or_queue_command(command, &block)
end
# Deletes the model specified by modelId from the dataset.
# @param [String] project_id
# Project ID of the model to delete.
# @param [String] dataset_id
# Dataset ID of the model to delete.
# @param [String] model_id
# Model ID of the model to delete.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
command.params['projectId'] = project_id unless project_id.nil?
command.params['datasetId'] = dataset_id unless dataset_id.nil?
command.params['modelId'] = model_id unless model_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets the specified model resource by model ID.
# @param [String] project_id
# Project ID of the requested model.
# @param [String] dataset_id
# Dataset ID of the requested model.
# @param [String] model_id
# Model ID of the requested model.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryV2::Model] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryV2::Model]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
command.response_representation = Google::Apis::BigqueryV2::Model::Representation
command.response_class = Google::Apis::BigqueryV2::Model
command.params['projectId'] = project_id unless project_id.nil?
command.params['datasetId'] = dataset_id unless dataset_id.nil?
command.params['modelId'] = model_id unless model_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all models in the specified dataset. Requires the READER dataset
# role.
# @param [String] project_id
# Project ID of the models to list.
# @param [String] dataset_id
# Dataset ID of the models to list.
# @param [Fixnum] max_results
# The maximum number of results per page.
# @param [String] page_token
# Page token, returned by a previous call to request the next page of
# results
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryV2::ListModelsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryV2::ListModelsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_models(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models', options)
command.response_representation = Google::Apis::BigqueryV2::ListModelsResponse::Representation
command.response_class = Google::Apis::BigqueryV2::ListModelsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['datasetId'] = dataset_id unless dataset_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Patch specific fields in the specified model.
# @param [String] project_id
# Project ID of the model to patch.
# @param [String] dataset_id
# Dataset ID of the model to patch.
# @param [String] model_id
# Model ID of the model to patch.
# @param [Google::Apis::BigqueryV2::Model] model_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryV2::Model] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryV2::Model]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
command.request_representation = Google::Apis::BigqueryV2::Model::Representation
command.request_object = model_object
command.response_representation = Google::Apis::BigqueryV2::Model::Representation
command.response_class = Google::Apis::BigqueryV2::Model
command.params['projectId'] = project_id unless project_id.nil?
command.params['datasetId'] = dataset_id unless dataset_id.nil?
command.params['modelId'] = model_id unless model_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns the email address of the service account for your project used for
# interactions with Google Cloud KMS.
# @param [String] project_id

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/tasks/
module CloudtasksV2
VERSION = 'V2'
REVISION = '20190314'
REVISION = '20190326'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'