File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,22 @@ def test_create_single_timeseries() -> None:
91
91
# 3 0 1 1 False -2470.632377 4945.264753 44319.379307 ['WEEKLY'] False False True
92
92
# 4 2 1 1 True -2463.671247 4937.342493 42633.299513 ['WEEKLY'] False False True
93
93
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_evaluate]
94
+
95
+ # [START bigquery_dataframes_single_timeseries_forecasting_model_tutorial_forecast]
96
+ prediction = model .predict (horizon = 30 , confidence_level = 0.8 )
97
+
98
+ print (prediction .peek ())
99
+ # Expected output:
100
+ # forecast_timestamp forecast_value standard_error confidence_level prediction_interval_lower_bound prediction_interval_upper_bound confidence_interval_lower_bound confidence_interval_upper_bound
101
+ # 11 2017-08-13 00:00:00+00:00 1845.439732 328.060405 0.8 1424.772257 2266.107208 1424.772257 2266.107208
102
+ # 29 2017-08-31 00:00:00+00:00 2615.993932 431.286628 0.8 2062.960849 3169.027015 2062.960849 3169.027015
103
+ # 7 2017-08-09 00:00:00+00:00 2639.285993 300.301186 0.8 2254.213792 3024.358193 2254.213792 3024.358193
104
+ # 25 2017-08-27 00:00:00+00:00 1853.735689 410.596551 0.8 1327.233216 2380.238162 1327.233216 2380.238162
105
+ # 1 2017-08-03 00:00:00+00:00 2621.33159 241.093355 0.8 2312.180802 2930.482379 2312.180802 2930.482379
106
+ # [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_forecast]
94
107
assert coef is not None
95
108
assert summary is not None
96
109
assert model is not None
97
110
assert parsed_date is not None
111
+ assert prediction is not None
98
112
assert total_visits is not None
You can’t perform that action at this time.
0 commit comments