Skip to content

docs: add snippet to see the ARIMA coefficients in the Forecast a single time series with a univariate model tutorial #1268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 8, 2025
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ def test_create_single_timeseries() -> None:

model.fit(X, y)
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_create]

# [START bigquery_dataframes_single_timeseries_forecasting_model_tutorial_evaluate]
coef = model.coef_
print(coef.peek())

# Expected output:
# ar_coefficients ma_coefficients intercept_or_drift
# 0 [0.40944762] [-0.81168198] 0.0

# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_evaluate]
assert coef is not None
assert model is not None
assert parsed_date is not None
assert total_visits is not None
Loading