Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: add snippet to explain the univariate model's forecast result in the Forecast a single time series with a univariate model tutorial #1272

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 22 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e89eb10
docs: add snippet to explain the univariate model's forecast result
rey-esp Jan 8, 2025
d96e825
docs: add snippet to explain the univariate model's forecast result
rey-esp Jan 8, 2025
954e316
resolve conflicts
rey-esp Jan 8, 2025
6d8c47a
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 8, 2025
862a3b0
merge main
rey-esp Jan 9, 2025
b36fb4f
Merge branch 'b338872698-bigframes-v3' of github.com:googleapis/pytho…
rey-esp Jan 9, 2025
26816b2
merge main
rey-esp Jan 10, 2025
eb89c1e
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 10, 2025
0fabeeb
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 13, 2025
549e800
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 14, 2025
0f2d572
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 14, 2025
248159d
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 15, 2025
2658060
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 15, 2025
de75da9
merge main
rey-esp Jan 16, 2025
e1a0670
Merge branch 'b338872698-bigframes-v3' of github.com:googleapis/pytho…
rey-esp Jan 16, 2025
be95faf
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 16, 2025
39a4339
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 21, 2025
d9486d4
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 22, 2025
284097e
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 22, 2025
f1cc15f
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 24, 2025
8dc4673
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 27, 2025
279aae6
Merge branch 'main' into b338872698-bigframes-v3
rey-esp Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_multiple_timeseries_forecasting_model(random_model_id: str) -> None:
your_model_id = random_model_id

# [START bigquery_dataframes_bqml_arima_multiple_step_2_visualize]

import bigframes.pandas as bpd

df = bpd.read_gbq("bigquery-public-data.new_york.citibike_trips")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,22 @@ def test_create_single_timeseries() -> None:
# 25 2017-08-27 00:00:00+00:00 1853.735689 410.596551 0.8 1327.233216 2380.238162 1327.233216 2380.238162
# 1 2017-08-03 00:00:00+00:00 2621.33159 241.093355 0.8 2312.180802 2930.482379 2312.180802 2930.482379
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_forecast]

# [START bigquery_dataframes_single_timeseries_forecasting_model_tutorial_explain_forecast]
ex_pred = model.predict_explain(horizon=30, confidence_level=0.8)

print(ex_pred.head(4))
# Expected output:
# time_series_timestamp time_series_type time_series_data time_series_adjusted_data standard_error confidence_level prediction_interval_lower_bound prediction_interval_upper_bound trend seasonal_period_yearly seasonal_period_quarterly seasonal_period_monthly seasonal_period_weekly seasonal_period_daily holiday_effect spikes_and_dips step_changes residual
# 0 2016-08-01 00:00:00+00:00 history 1711.0 505.716474 206.939556 <NA> <NA> <NA> 0.0 <NA> <NA> <NA> 169.611938 <NA> <NA> <NA> 1205.283526 336.104536
# 1 2016-08-02 00:00:00+00:00 history 2140.0 623.137701 206.939556 <NA> <NA> <NA> 336.104428 <NA> <NA> <NA> 287.033273 <NA> <NA> <NA> 1205.283526 311.578773
# 2 2016-08-03 00:00:00+00:00 history 2890.0 1008.655091 206.939556 <NA> <NA> <NA> 563.514213 <NA> <NA> <NA> 445.140878 <NA> <NA> <NA> 1205.283526 676.061383
# 3 2016-08-04 00:00:00+00:00 history 3161.0 1389.40959 206.939556 <NA> <NA> <NA> 986.317236 <NA> <NA> <NA> 403.092354 <NA> <NA> <NA> 1205.283526 566.306884
# 4 2016-08-05 00:00:00+00:00 history 2702.0 1394.395741 206.939556 <NA> <NA> <NA> 1248.707386 <NA> <NA> <NA> 145.688355 <NA> <NA> <NA> 1205.283526 102.320733
# 5 2016-08-06 00:00:00+00:00 history 1663.0 437.09243 206.939556 <NA> <NA> <NA> 1188.59004 <NA> <NA> <NA> -751.49761 <NA> <NA> <NA> 1205.283526 20.624044
# [END bigquery_dataframes_single_timeseries_forecasting_model_tutorial_explain_forecast]
assert coef is not None
assert ex_pred is not None
assert summary is not None
assert model is not None
assert parsed_date is not None
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.