1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288 |
- syntax = "proto3";
- package google.cloud.bigquery.v2;
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/cloud/bigquery/v2/encryption_config.proto";
- import "google/cloud/bigquery/v2/model_reference.proto";
- import "google/cloud/bigquery/v2/standard_sql.proto";
- import "google/cloud/bigquery/v2/table_reference.proto";
- import "google/protobuf/empty.proto";
- import "google/protobuf/timestamp.proto";
- import "google/protobuf/wrappers.proto";
- import "google/api/annotations.proto";
- option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery";
- option java_outer_classname = "ModelProto";
- option java_package = "com.google.cloud.bigquery.v2";
- service ModelService {
- option (google.api.default_host) = "bigquery.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/bigquery,"
- "https://www.googleapis.com/auth/bigquery.readonly,"
- "https://www.googleapis.com/auth/cloud-platform,"
- "https://www.googleapis.com/auth/cloud-platform.read-only";
-
- rpc GetModel(GetModelRequest) returns (Model) {
- option (google.api.http) = {
- get: "/bigquery/v2/projects/{project_id=*}/datasets/{dataset_id=*}/models/{model_id=*}"
- };
- option (google.api.method_signature) = "project_id,dataset_id,model_id";
- }
-
-
-
- rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
- option (google.api.http) = {
- get: "/bigquery/v2/projects/{project_id=*}/datasets/{dataset_id=*}/models"
- };
- option (google.api.method_signature) = "project_id,dataset_id,max_results";
- }
-
- rpc PatchModel(PatchModelRequest) returns (Model) {
- option (google.api.http) = {
- patch: "/bigquery/v2/projects/{project_id=*}/datasets/{dataset_id=*}/models/{model_id=*}"
- body: "model"
- };
- option (google.api.method_signature) = "project_id,dataset_id,model_id,model";
- }
-
- rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/bigquery/v2/projects/{project_id=*}/datasets/{dataset_id=*}/models/{model_id=*}"
- };
- option (google.api.method_signature) = "project_id,dataset_id,model_id";
- }
- }
- message Model {
- message SeasonalPeriod {
- enum SeasonalPeriodType {
- SEASONAL_PERIOD_TYPE_UNSPECIFIED = 0;
-
- NO_SEASONALITY = 1;
-
- DAILY = 2;
-
- WEEKLY = 3;
-
- MONTHLY = 4;
-
- QUARTERLY = 5;
-
- YEARLY = 6;
- }
- }
- message KmeansEnums {
-
-
- enum KmeansInitializationMethod {
-
- KMEANS_INITIALIZATION_METHOD_UNSPECIFIED = 0;
-
- RANDOM = 1;
-
-
- CUSTOM = 2;
-
- KMEANS_PLUS_PLUS = 3;
- }
- }
-
-
- message RegressionMetrics {
-
- google.protobuf.DoubleValue mean_absolute_error = 1;
-
- google.protobuf.DoubleValue mean_squared_error = 2;
-
- google.protobuf.DoubleValue mean_squared_log_error = 3;
-
- google.protobuf.DoubleValue median_absolute_error = 4;
-
- google.protobuf.DoubleValue r_squared = 5;
- }
-
-
-
-
-
-
- message AggregateClassificationMetrics {
-
-
-
- google.protobuf.DoubleValue precision = 1;
-
-
- google.protobuf.DoubleValue recall = 2;
-
-
- google.protobuf.DoubleValue accuracy = 3;
-
-
-
-
- google.protobuf.DoubleValue threshold = 4;
-
-
- google.protobuf.DoubleValue f1_score = 5;
-
- google.protobuf.DoubleValue log_loss = 6;
-
-
- google.protobuf.DoubleValue roc_auc = 7;
- }
-
- message BinaryClassificationMetrics {
-
- message BinaryConfusionMatrix {
-
- google.protobuf.DoubleValue positive_class_threshold = 1;
-
- google.protobuf.Int64Value true_positives = 2;
-
- google.protobuf.Int64Value false_positives = 3;
-
- google.protobuf.Int64Value true_negatives = 4;
-
- google.protobuf.Int64Value false_negatives = 5;
-
-
- google.protobuf.DoubleValue precision = 6;
-
-
- google.protobuf.DoubleValue recall = 7;
-
- google.protobuf.DoubleValue f1_score = 8;
-
- google.protobuf.DoubleValue accuracy = 9;
- }
-
- AggregateClassificationMetrics aggregate_classification_metrics = 1;
-
- repeated BinaryConfusionMatrix binary_confusion_matrix_list = 2;
-
- string positive_label = 3;
-
- string negative_label = 4;
- }
-
- message MultiClassClassificationMetrics {
-
- message ConfusionMatrix {
-
- message Entry {
-
-
-
- string predicted_label = 1;
-
- google.protobuf.Int64Value item_count = 2;
- }
-
- message Row {
-
- string actual_label = 1;
-
- repeated Entry entries = 2;
- }
-
-
- google.protobuf.DoubleValue confidence_threshold = 1;
-
- repeated Row rows = 2;
- }
-
- AggregateClassificationMetrics aggregate_classification_metrics = 1;
-
- repeated ConfusionMatrix confusion_matrix_list = 2;
- }
-
- message ClusteringMetrics {
-
- message Cluster {
-
- message FeatureValue {
-
- message CategoricalValue {
-
- message CategoryCount {
-
- string category = 1;
-
-
- google.protobuf.Int64Value count = 2;
- }
-
-
-
-
- repeated CategoryCount category_counts = 1;
- }
-
- string feature_column = 1;
- oneof value {
-
-
- google.protobuf.DoubleValue numerical_value = 2;
-
- CategoricalValue categorical_value = 3;
- }
- }
-
- int64 centroid_id = 1;
-
- repeated FeatureValue feature_values = 2;
-
- google.protobuf.Int64Value count = 3;
- }
-
- google.protobuf.DoubleValue davies_bouldin_index = 1;
-
- google.protobuf.DoubleValue mean_squared_distance = 2;
-
- repeated Cluster clusters = 3;
- }
-
-
- message RankingMetrics {
-
-
- google.protobuf.DoubleValue mean_average_precision = 1;
-
-
-
-
- google.protobuf.DoubleValue mean_squared_error = 2;
-
-
-
- google.protobuf.DoubleValue normalized_discounted_cumulative_gain = 3;
-
-
- google.protobuf.DoubleValue average_rank = 4;
- }
-
- message ArimaForecastingMetrics {
-
- message ArimaSingleModelForecastingMetrics {
-
- ArimaOrder non_seasonal_order = 1;
-
- ArimaFittingMetrics arima_fitting_metrics = 2;
-
-
- bool has_drift = 3;
-
-
-
-
- string time_series_id = 4;
-
-
-
-
-
-
- repeated string time_series_ids = 9;
-
-
- repeated SeasonalPeriod.SeasonalPeriodType seasonal_periods = 5;
-
- google.protobuf.BoolValue has_holiday_effect = 6;
-
- google.protobuf.BoolValue has_spikes_and_dips = 7;
-
- google.protobuf.BoolValue has_step_changes = 8;
- }
-
- repeated ArimaOrder non_seasonal_order = 1 [deprecated = true];
-
- repeated ArimaFittingMetrics arima_fitting_metrics = 2 [deprecated = true];
-
-
- repeated SeasonalPeriod.SeasonalPeriodType seasonal_periods = 3 [deprecated = true];
-
-
- repeated bool has_drift = 4 [deprecated = true];
-
- repeated string time_series_id = 5 [deprecated = true];
-
-
- repeated ArimaSingleModelForecastingMetrics arima_single_model_forecasting_metrics = 6;
- }
-
-
-
- message EvaluationMetrics {
- oneof metrics {
-
-
- RegressionMetrics regression_metrics = 1;
-
- BinaryClassificationMetrics binary_classification_metrics = 2;
-
- MultiClassClassificationMetrics multi_class_classification_metrics = 3;
-
- ClusteringMetrics clustering_metrics = 4;
-
- RankingMetrics ranking_metrics = 5;
-
- ArimaForecastingMetrics arima_forecasting_metrics = 6;
- }
- }
-
-
- message DataSplitResult {
-
- TableReference training_table = 1;
-
- TableReference evaluation_table = 2;
- }
-
- message ArimaOrder {
-
- int64 p = 1;
-
- int64 d = 2;
-
- int64 q = 3;
- }
-
- message ArimaFittingMetrics {
-
- double log_likelihood = 1;
-
- double aic = 2;
-
- double variance = 3;
- }
-
-
- message GlobalExplanation {
-
- message Explanation {
-
-
-
- string feature_name = 1;
-
- google.protobuf.DoubleValue attribution = 2;
- }
-
-
- repeated Explanation explanations = 1;
-
-
-
- string class_label = 2;
- }
-
- message TrainingRun {
-
- message TrainingOptions {
-
-
- int64 max_iterations = 1;
-
- LossType loss_type = 2;
-
- double learn_rate = 3;
-
- google.protobuf.DoubleValue l1_regularization = 4;
-
- google.protobuf.DoubleValue l2_regularization = 5;
-
-
-
- google.protobuf.DoubleValue min_relative_progress = 6;
-
- google.protobuf.BoolValue warm_start = 7;
-
-
-
- google.protobuf.BoolValue early_stop = 8;
-
- repeated string input_label_columns = 9;
-
- DataSplitMethod data_split_method = 10;
-
-
-
-
- double data_split_eval_fraction = 11;
-
-
-
-
-
-
-
-
-
-
- string data_split_column = 12;
-
- LearnRateStrategy learn_rate_strategy = 13;
-
-
- double initial_learn_rate = 16;
-
-
- map<string, double> label_class_weights = 17;
-
- string user_column = 18;
-
- string item_column = 19;
-
- DistanceType distance_type = 20;
-
- int64 num_clusters = 21;
-
-
- string model_uri = 22;
-
- OptimizationStrategy optimization_strategy = 23;
-
- repeated int64 hidden_units = 24;
-
- int64 batch_size = 25;
-
- google.protobuf.DoubleValue dropout = 26;
-
- int64 max_tree_depth = 27;
-
-
- double subsample = 28;
-
- google.protobuf.DoubleValue min_split_loss = 29;
-
- int64 num_factors = 30;
-
-
- FeedbackType feedback_type = 31;
-
-
- google.protobuf.DoubleValue wals_alpha = 32;
-
- KmeansEnums.KmeansInitializationMethod kmeans_initialization_method = 33;
-
-
- string kmeans_initialization_column = 34;
-
- string time_series_timestamp_column = 35;
-
- string time_series_data_column = 36;
-
- bool auto_arima = 37;
-
-
-
- ArimaOrder non_seasonal_order = 38;
-
- DataFrequency data_frequency = 39;
-
- bool include_drift = 41;
-
-
-
- HolidayRegion holiday_region = 42;
-
- string time_series_id_column = 43;
-
- repeated string time_series_id_columns = 51;
-
- int64 horizon = 44;
-
-
-
-
- bool preserve_input_structs = 45;
-
- int64 auto_arima_max_order = 46;
-
- google.protobuf.BoolValue decompose_time_series = 50;
-
- google.protobuf.BoolValue clean_spikes_and_dips = 52;
-
-
- google.protobuf.BoolValue adjust_step_changes = 53;
- }
-
- message IterationResult {
-
- message ClusterInfo {
-
- int64 centroid_id = 1;
-
-
- google.protobuf.DoubleValue cluster_radius = 2;
-
- google.protobuf.Int64Value cluster_size = 3;
- }
-
-
- message ArimaResult {
-
- message ArimaCoefficients {
-
- repeated double auto_regressive_coefficients = 1;
-
- repeated double moving_average_coefficients = 2;
-
- double intercept_coefficient = 3;
- }
-
- message ArimaModelInfo {
-
- ArimaOrder non_seasonal_order = 1;
-
- ArimaCoefficients arima_coefficients = 2;
-
- ArimaFittingMetrics arima_fitting_metrics = 3;
-
-
- bool has_drift = 4;
-
-
-
-
- string time_series_id = 5;
-
-
-
-
-
-
- repeated string time_series_ids = 10;
-
-
- repeated SeasonalPeriod.SeasonalPeriodType seasonal_periods = 6;
-
-
- google.protobuf.BoolValue has_holiday_effect = 7;
-
-
- google.protobuf.BoolValue has_spikes_and_dips = 8;
-
-
- google.protobuf.BoolValue has_step_changes = 9;
- }
-
-
- repeated ArimaModelInfo arima_model_info = 1;
-
-
- repeated SeasonalPeriod.SeasonalPeriodType seasonal_periods = 2;
- }
-
- google.protobuf.Int32Value index = 1;
-
- google.protobuf.Int64Value duration_ms = 4;
-
- google.protobuf.DoubleValue training_loss = 5;
-
- google.protobuf.DoubleValue eval_loss = 6;
-
- double learn_rate = 7;
-
- repeated ClusterInfo cluster_infos = 8;
- ArimaResult arima_result = 9;
- }
-
-
- TrainingOptions training_options = 1;
-
- google.protobuf.Timestamp start_time = 8;
-
- repeated IterationResult results = 6;
-
-
- EvaluationMetrics evaluation_metrics = 7;
-
-
- DataSplitResult data_split_result = 9;
-
-
-
- repeated GlobalExplanation global_explanations = 10;
- }
-
- enum ModelType {
- MODEL_TYPE_UNSPECIFIED = 0;
-
- LINEAR_REGRESSION = 1;
-
- LOGISTIC_REGRESSION = 2;
-
- KMEANS = 3;
-
- MATRIX_FACTORIZATION = 4;
-
- DNN_CLASSIFIER = 5;
-
- TENSORFLOW = 6;
-
- DNN_REGRESSOR = 7;
-
- BOOSTED_TREE_REGRESSOR = 9;
-
- BOOSTED_TREE_CLASSIFIER = 10;
-
- ARIMA = 11;
-
- AUTOML_REGRESSOR = 12;
-
- AUTOML_CLASSIFIER = 13;
-
- ARIMA_PLUS = 19;
- }
-
- enum LossType {
- LOSS_TYPE_UNSPECIFIED = 0;
-
- MEAN_SQUARED_LOSS = 1;
-
- MEAN_LOG_LOSS = 2;
- }
-
- enum DistanceType {
- DISTANCE_TYPE_UNSPECIFIED = 0;
-
- EUCLIDEAN = 1;
-
- COSINE = 2;
- }
-
- enum DataSplitMethod {
- DATA_SPLIT_METHOD_UNSPECIFIED = 0;
-
- RANDOM = 1;
-
- CUSTOM = 2;
-
- SEQUENTIAL = 3;
-
- NO_SPLIT = 4;
-
-
- AUTO_SPLIT = 5;
- }
-
- enum DataFrequency {
- DATA_FREQUENCY_UNSPECIFIED = 0;
-
- AUTO_FREQUENCY = 1;
-
- YEARLY = 2;
-
- QUARTERLY = 3;
-
- MONTHLY = 4;
-
- WEEKLY = 5;
-
- DAILY = 6;
-
- HOURLY = 7;
-
- PER_MINUTE = 8;
- }
-
- enum HolidayRegion {
-
- HOLIDAY_REGION_UNSPECIFIED = 0;
-
- GLOBAL = 1;
-
- NA = 2;
-
-
- JAPAC = 3;
-
- EMEA = 4;
-
- LAC = 5;
-
- AE = 6;
-
- AR = 7;
-
- AT = 8;
-
- AU = 9;
-
- BE = 10;
-
- BR = 11;
-
- CA = 12;
-
- CH = 13;
-
- CL = 14;
-
- CN = 15;
-
- CO = 16;
-
- CS = 17;
-
- CZ = 18;
-
- DE = 19;
-
- DK = 20;
-
- DZ = 21;
-
- EC = 22;
-
- EE = 23;
-
- EG = 24;
-
- ES = 25;
-
- FI = 26;
-
- FR = 27;
-
- GB = 28;
-
- GR = 29;
-
- HK = 30;
-
- HU = 31;
-
- ID = 32;
-
- IE = 33;
-
- IL = 34;
-
- IN = 35;
-
- IR = 36;
-
- IT = 37;
-
- JP = 38;
-
- KR = 39;
-
- LV = 40;
-
- MA = 41;
-
- MX = 42;
-
- MY = 43;
-
- NG = 44;
-
- NL = 45;
-
- NO = 46;
-
- NZ = 47;
-
- PE = 48;
-
- PH = 49;
-
- PK = 50;
-
- PL = 51;
-
- PT = 52;
-
- RO = 53;
-
- RS = 54;
-
- RU = 55;
-
- SA = 56;
-
- SE = 57;
-
- SG = 58;
-
- SI = 59;
-
- SK = 60;
-
- TH = 61;
-
- TR = 62;
-
- TW = 63;
-
- UA = 64;
-
- US = 65;
-
- VE = 66;
-
- VN = 67;
-
- ZA = 68;
- }
-
- enum LearnRateStrategy {
- LEARN_RATE_STRATEGY_UNSPECIFIED = 0;
-
- LINE_SEARCH = 1;
-
- CONSTANT = 2;
- }
-
- enum OptimizationStrategy {
- OPTIMIZATION_STRATEGY_UNSPECIFIED = 0;
-
- BATCH_GRADIENT_DESCENT = 1;
-
- NORMAL_EQUATION = 2;
- }
-
- enum FeedbackType {
- FEEDBACK_TYPE_UNSPECIFIED = 0;
-
- IMPLICIT = 1;
-
- EXPLICIT = 2;
- }
-
- string etag = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- ModelReference model_reference = 2 [(google.api.field_behavior) = REQUIRED];
-
- int64 creation_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- int64 last_modified_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- string description = 12 [(google.api.field_behavior) = OPTIONAL];
-
- string friendly_name = 14 [(google.api.field_behavior) = OPTIONAL];
-
-
-
-
-
-
- map<string, string> labels = 15;
-
-
-
-
-
- int64 expiration_time = 16 [(google.api.field_behavior) = OPTIONAL];
-
-
- string location = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
-
-
-
-
- EncryptionConfiguration encryption_configuration = 17;
-
- ModelType model_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- repeated TrainingRun training_runs = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- repeated StandardSqlField feature_columns = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
-
-
- repeated StandardSqlField label_columns = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- int64 best_trial_id = 19 [deprecated = true];
- }
- message GetModelRequest {
-
- string project_id = 1 [(google.api.field_behavior) = REQUIRED];
-
- string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
-
- string model_id = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message PatchModelRequest {
-
- string project_id = 1 [(google.api.field_behavior) = REQUIRED];
-
- string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
-
- string model_id = 3 [(google.api.field_behavior) = REQUIRED];
-
-
-
- Model model = 4 [(google.api.field_behavior) = REQUIRED];
- }
- message DeleteModelRequest {
-
- string project_id = 1 [(google.api.field_behavior) = REQUIRED];
-
- string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
-
- string model_id = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message ListModelsRequest {
-
- string project_id = 1 [(google.api.field_behavior) = REQUIRED];
-
- string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
-
-
- google.protobuf.UInt32Value max_results = 3;
-
-
- string page_token = 4;
- }
- message ListModelsResponse {
-
-
-
- repeated Model models = 1;
-
- string next_page_token = 2;
- }
|