Skip to content

Commit 059a564

Browse files
rey-esptswast
andauthored
docs: add snippet to see the ARIMA coefficients in the Forecast a single time series with a univariate model tutorial (#1268)
* merge main * details * Update samples/snippets/create_single_timeseries_forecasting_model_test.py Co-authored-by: Tim Sweña (Swast) <[email protected]> * fix * edit --------- Co-authored-by: Tim Sweña (Swast) <[email protected]>
1 parent bb7a850 commit 059a564

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

samples/snippets/create_single_timeseries_forecasting_model_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ def test_create_single_timeseries() -> None:
6464

6565
model.fit(X, y)
6666
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_create]
67+
68+
# [START bigquery_dataframes_single_timeseries_forecasting_model_tutorial_evaluate]
69+
coef = model.coef_
70+
print(coef.peek())
71+
72+
# Expected output:
73+
# ar_coefficients ma_coefficients intercept_or_drift
74+
# 0 [0.40944762] [-0.81168198] 0.0
75+
76+
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_evaluate]
77+
assert coef is not None
6778
assert model is not None
6879
assert parsed_date is not None
6980
assert total_visits is not None

0 commit comments

Comments
 (0)