@@ -96,6 +96,8 @@ class Model(proto.Message):
96
96
Output only. Label columns that were used to train this
97
97
model. The output of the model will have a `predicted_`
98
98
prefix to these columns.
99
+ best_trial_id (int):
100
+ The best trial_id across all training runs.
99
101
"""
100
102
101
103
class ModelType (proto .Enum ):
@@ -113,6 +115,7 @@ class ModelType(proto.Enum):
113
115
ARIMA = 11
114
116
AUTOML_REGRESSOR = 12
115
117
AUTOML_CLASSIFIER = 13
118
+ ARIMA_PLUS = 19
116
119
117
120
class LossType (proto .Enum ):
118
121
r"""Loss metric to evaluate model training performance."""
@@ -151,6 +154,7 @@ class DataFrequency(proto.Enum):
151
154
WEEKLY = 5
152
155
DAILY = 6
153
156
HOURLY = 7
157
+ PER_MINUTE = 8
154
158
155
159
class HolidayRegion (proto .Enum ):
156
160
r"""Type of supported holiday regions for time series forecasting
@@ -285,7 +289,7 @@ class RegressionMetrics(proto.Message):
285
289
median_absolute_error (google.protobuf.wrappers_pb2.DoubleValue):
286
290
Median absolute error.
287
291
r_squared (google.protobuf.wrappers_pb2.DoubleValue):
288
- R^2 score.
292
+ R^2 score. This corresponds to r2_score in ML.EVALUATE.
289
293
"""
290
294
291
295
mean_absolute_error = proto .Field (
@@ -528,7 +532,7 @@ class ClusteringMetrics(proto.Message):
528
532
Mean of squared distances between each sample
529
533
to its cluster centroid.
530
534
clusters (Sequence[google.cloud.bigquery_v2.types.Model.ClusteringMetrics.Cluster]):
531
- [Beta] Information for all clusters.
535
+ Information for all clusters.
532
536
"""
533
537
534
538
class Cluster (proto .Message ):
@@ -697,10 +701,29 @@ class ArimaSingleModelForecastingMetrics(proto.Message):
697
701
Is arima model fitted with drift or not. It
698
702
is always false when d is not 1.
699
703
time_series_id (str):
700
- The id to indicate different time series.
704
+ The time_series_id value for this time series. It will be
705
+ one of the unique values from the time_series_id_column
706
+ specified during ARIMA model training. Only present when
707
+ time_series_id_column training option was used.
708
+ time_series_ids (Sequence[str]):
709
+ The tuple of time_series_ids identifying this time series.
710
+ It will be one of the unique tuples of values present in the
711
+ time_series_id_columns specified during ARIMA model
712
+ training. Only present when time_series_id_columns training
713
+ option was used and the order of values here are same as the
714
+ order of time_series_id_columns.
701
715
seasonal_periods (Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]):
702
716
Seasonal periods. Repeated because multiple
703
717
periods are supported for one time series.
718
+ has_holiday_effect (google.protobuf.wrappers_pb2.BoolValue):
719
+ If true, holiday_effect is a part of time series
720
+ decomposition result.
721
+ has_spikes_and_dips (google.protobuf.wrappers_pb2.BoolValue):
722
+ If true, spikes_and_dips is a part of time series
723
+ decomposition result.
724
+ has_step_changes (google.protobuf.wrappers_pb2.BoolValue):
725
+ If true, step_changes is a part of time series decomposition
726
+ result.
704
727
"""
705
728
706
729
non_seasonal_order = proto .Field (
@@ -711,9 +734,19 @@ class ArimaSingleModelForecastingMetrics(proto.Message):
711
734
)
712
735
has_drift = proto .Field (proto .BOOL , number = 3 ,)
713
736
time_series_id = proto .Field (proto .STRING , number = 4 ,)
737
+ time_series_ids = proto .RepeatedField (proto .STRING , number = 9 ,)
714
738
seasonal_periods = proto .RepeatedField (
715
739
proto .ENUM , number = 5 , enum = "Model.SeasonalPeriod.SeasonalPeriodType" ,
716
740
)
741
+ has_holiday_effect = proto .Field (
742
+ proto .MESSAGE , number = 6 , message = wrappers_pb2 .BoolValue ,
743
+ )
744
+ has_spikes_and_dips = proto .Field (
745
+ proto .MESSAGE , number = 7 , message = wrappers_pb2 .BoolValue ,
746
+ )
747
+ has_step_changes = proto .Field (
748
+ proto .MESSAGE , number = 8 , message = wrappers_pb2 .BoolValue ,
749
+ )
717
750
718
751
non_seasonal_order = proto .RepeatedField (
719
752
proto .MESSAGE , number = 1 , message = "Model.ArimaOrder" ,
@@ -901,7 +934,7 @@ class TrainingRun(proto.Message):
901
934
"""
902
935
903
936
class TrainingOptions (proto .Message ):
904
- r"""
937
+ r"""Options used in model training.
905
938
Attributes:
906
939
max_iterations (int):
907
940
The maximum number of iterations in training.
@@ -972,8 +1005,9 @@ class TrainingOptions(proto.Message):
972
1005
num_clusters (int):
973
1006
Number of clusters for clustering models.
974
1007
model_uri (str):
975
- [Beta] Google Cloud Storage URI from which the model was
976
- imported. Only applicable for imported models.
1008
+ Google Cloud Storage URI from which the model
1009
+ was imported. Only applicable for imported
1010
+ models.
977
1011
optimization_strategy (google.cloud.bigquery_v2.types.Model.OptimizationStrategy):
978
1012
Optimization strategy for training linear
979
1013
regression models.
@@ -1030,8 +1064,11 @@ class TrainingOptions(proto.Message):
1030
1064
If a valid value is specified, then holiday
1031
1065
effects modeling is enabled.
1032
1066
time_series_id_column (str):
1033
- The id column that will be used to indicate
1034
- different time series to forecast in parallel.
1067
+ The time series id column that was used
1068
+ during ARIMA model training.
1069
+ time_series_id_columns (Sequence[str]):
1070
+ The time series id columns that were used
1071
+ during ARIMA model training.
1035
1072
horizon (int):
1036
1073
The number of periods ahead that need to be
1037
1074
forecasted.
@@ -1042,6 +1079,15 @@ class TrainingOptions(proto.Message):
1042
1079
output feature name is A.b.
1043
1080
auto_arima_max_order (int):
1044
1081
The max value of non-seasonal p and q.
1082
+ decompose_time_series (google.protobuf.wrappers_pb2.BoolValue):
1083
+ If true, perform decompose time series and
1084
+ save the results.
1085
+ clean_spikes_and_dips (google.protobuf.wrappers_pb2.BoolValue):
1086
+ If true, clean spikes and dips in the input
1087
+ time series.
1088
+ adjust_step_changes (google.protobuf.wrappers_pb2.BoolValue):
1089
+ If true, detect step changes and make data
1090
+ adjustment in the input time series.
1045
1091
"""
1046
1092
1047
1093
max_iterations = proto .Field (proto .INT64 , number = 1 ,)
@@ -1120,9 +1166,19 @@ class TrainingOptions(proto.Message):
1120
1166
proto .ENUM , number = 42 , enum = "Model.HolidayRegion" ,
1121
1167
)
1122
1168
time_series_id_column = proto .Field (proto .STRING , number = 43 ,)
1169
+ time_series_id_columns = proto .RepeatedField (proto .STRING , number = 51 ,)
1123
1170
horizon = proto .Field (proto .INT64 , number = 44 ,)
1124
1171
preserve_input_structs = proto .Field (proto .BOOL , number = 45 ,)
1125
1172
auto_arima_max_order = proto .Field (proto .INT64 , number = 46 ,)
1173
+ decompose_time_series = proto .Field (
1174
+ proto .MESSAGE , number = 50 , message = wrappers_pb2 .BoolValue ,
1175
+ )
1176
+ clean_spikes_and_dips = proto .Field (
1177
+ proto .MESSAGE , number = 52 , message = wrappers_pb2 .BoolValue ,
1178
+ )
1179
+ adjust_step_changes = proto .Field (
1180
+ proto .MESSAGE , number = 53 , message = wrappers_pb2 .BoolValue ,
1181
+ )
1126
1182
1127
1183
class IterationResult (proto .Message ):
1128
1184
r"""Information about a single iteration of the training run.
@@ -1218,10 +1274,29 @@ class ArimaModelInfo(proto.Message):
1218
1274
Whether Arima model fitted with drift or not.
1219
1275
It is always false when d is not 1.
1220
1276
time_series_id (str):
1221
- The id to indicate different time series.
1277
+ The time_series_id value for this time series. It will be
1278
+ one of the unique values from the time_series_id_column
1279
+ specified during ARIMA model training. Only present when
1280
+ time_series_id_column training option was used.
1281
+ time_series_ids (Sequence[str]):
1282
+ The tuple of time_series_ids identifying this time series.
1283
+ It will be one of the unique tuples of values present in the
1284
+ time_series_id_columns specified during ARIMA model
1285
+ training. Only present when time_series_id_columns training
1286
+ option was used and the order of values here are same as the
1287
+ order of time_series_id_columns.
1222
1288
seasonal_periods (Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]):
1223
1289
Seasonal periods. Repeated because multiple
1224
1290
periods are supported for one time series.
1291
+ has_holiday_effect (google.protobuf.wrappers_pb2.BoolValue):
1292
+ If true, holiday_effect is a part of time series
1293
+ decomposition result.
1294
+ has_spikes_and_dips (google.protobuf.wrappers_pb2.BoolValue):
1295
+ If true, spikes_and_dips is a part of time series
1296
+ decomposition result.
1297
+ has_step_changes (google.protobuf.wrappers_pb2.BoolValue):
1298
+ If true, step_changes is a part of time series decomposition
1299
+ result.
1225
1300
"""
1226
1301
1227
1302
non_seasonal_order = proto .Field (
@@ -1237,11 +1312,21 @@ class ArimaModelInfo(proto.Message):
1237
1312
)
1238
1313
has_drift = proto .Field (proto .BOOL , number = 4 ,)
1239
1314
time_series_id = proto .Field (proto .STRING , number = 5 ,)
1315
+ time_series_ids = proto .RepeatedField (proto .STRING , number = 10 ,)
1240
1316
seasonal_periods = proto .RepeatedField (
1241
1317
proto .ENUM ,
1242
1318
number = 6 ,
1243
1319
enum = "Model.SeasonalPeriod.SeasonalPeriodType" ,
1244
1320
)
1321
+ has_holiday_effect = proto .Field (
1322
+ proto .MESSAGE , number = 7 , message = wrappers_pb2 .BoolValue ,
1323
+ )
1324
+ has_spikes_and_dips = proto .Field (
1325
+ proto .MESSAGE , number = 8 , message = wrappers_pb2 .BoolValue ,
1326
+ )
1327
+ has_step_changes = proto .Field (
1328
+ proto .MESSAGE , number = 9 , message = wrappers_pb2 .BoolValue ,
1329
+ )
1245
1330
1246
1331
arima_model_info = proto .RepeatedField (
1247
1332
proto .MESSAGE ,
@@ -1319,6 +1404,7 @@ class ArimaModelInfo(proto.Message):
1319
1404
label_columns = proto .RepeatedField (
1320
1405
proto .MESSAGE , number = 11 , message = standard_sql .StandardSqlField ,
1321
1406
)
1407
+ best_trial_id = proto .Field (proto .INT64 , number = 19 ,)
1322
1408
1323
1409
1324
1410
class GetModelRequest (proto .Message ):
0 commit comments