Time-series forecasting is a type of statistical or machine learning approach that tries to model historical time-series data in order to make predictions about future time points.
Compared to other types of models, time-series forecasting comes with its unique challenges, such as seasonality, holiday effects, data sparsity, and changing trends. Many machine learning techniques don’t work well here due to the sequential nature and temporal correlation of time series. For example, k-fold cross validation can cause data leakage; models need to be retrained to generate new forecasts. The balance between overfitting and underfitting is a tricky act without the ability to randomize the time dimension. With potentially millions of items to forecast, the scalability of any forecasting solution must also be considered. Tasks in addition to forecasting may be important to business such as anomaly detection, uncertainty quantification, and causal inference. Time-series forecasting is not just supervised learning over data with timestamps. Fortunately, Google Cloud offers a wide range of solutions for every business need.
For example, a large retail store may have millions of items to forecast so that inventory is available when demand is high, and not overstocked when demand is low.
Retail demand forecasting for products
Build an end-to-end solution for forecasting demand for retail products. Use historical sales data to train a demand forecasting model using BigQuery ML, and then visualize the forecasted values in a Looker Studio dashboard to share with your stakeholders. Explore how demand forecasting can reduce food waste.
Commodity price forecasting
Time-series models are used to forecast the prices of commodities that are critical to your business and production processes, and inform your cashflow models and financial plans.
Cashflow forecasting
Time-series models are typically combined with regression and classification models to produce highly accurate cashflow forecasts based on historical accounting time series along with inputs from transactional data and contractual obligations. Here you can use ARIMA_PLUS with BigQuery ML and combine it with supervised models in BigQuery ML, like GLM, boosted tree models, and AutoML.
Anomaly detection with demand forecasting
When it's holidays, gift-giving season, or end-of-year sales, sometimes there are spikes that you expect. But what about when there are spikes (or dips) that you don't expect? For example, how can you spot unusually high (or unusually low) demand that you were not expecting? Learn how you can use anomaly detection with BigQuery ML to find an anomalous spike in bike rentals that happens to coincide with the day that public transportation was disrupted in the city of London.
Manufacturing quality control and metric monitoring
From IoT sensors to production output, monitoring of metrics can come in many forms. However, the common element is to forecast the typical range of these metrics so you can plan ahead and respond as quickly as possible with monitoring systems in place.
Other common use cases for anomaly detection include pricing anomalies due to wrong pricing, real-time anomaly detection, and manufacturing quality control.
Ads effectiveness
How effective were your ads in generating lift for a business? Causal inference can help you look at the statistical significance of ad campaigns.
Impact of major events on time series
You may want to know if the impact of major events, like Brexit, on a time series was statistically significant. Learn more about how you could do causal inference to answer "How did the Brexit vote impact exchange rates between the British Pound and US Dollar"?
Other areas for causal inference analysis include promotions, incentive effectiveness, and price elasticity estimates.
BigQuery ML enables users to create and execute machine learning models in BigQuery by using standard SQL queries. It supports a model type called ARIMA_PLUS to perform time-series forecasting and anomaly detection tasks.
With ARIMA_PLUS modeling in BigQuery ML, you can make forecasts on millions of time series within a single SQL query, without leaving your data warehouse.
ARIMA_PLUS is essentially a time-series modeling pipeline, which includes the following functionalities:
Tens of millions of time series can be forecast at once with a single query. Different modeling pipelines run in parallel, if enough BigQuery slots are available.
You can get started with BigQuery ARIMA_PLUS with the following tutorials:
For detailed information, please refer to the BigQuery ML public documentation.
Vertex Forecast provides multiple options to users to train the time series forecasting model:
For detailed information, please refer to Vertex Forecast public documentation.
You can get started with the Vertex Forecasting tutorial.
If you want to bring your own custom code, but want to leverage training/serving infrastructure on Google Cloud, you can use Vertex AI Notebooks to run any code in Python, R, TensorFlow, or PyTorch.
TimesFM (Time Series Foundation Model) is a pre-trained time-series foundation model developed by Google Research for univariate time-series forecasting.
The 1.0 release contains a 200M-parameter checkpoint along with its inference code. It’s a transformer based model, and was trained in the decoder only fashion on a pre-trained dataset containing over 100 billion real-world timepoints. It performs univariate time series forecasting for context lengths up to 512 timepoints and any horizon lengths, with an optional frequency indicator input.
Use Case: Times series forecast - The model takes as input context a univariate time series, along with an optional frequency parameter. The model forecasts the time series into a future horizon of any length.
With univariate forecasting, you forecast future data using only the historical time series data. For example, to forecast the temperature tomorrow in New York City, univariate forecasting would mean to only use a single variable, historical temperatures, to predict future temperatures. With univariate forecasting, you can also discover seasonal patterns and trends.
With multivariate forecasting, you forecast future data using multiple factors. For example, to forecast the temperature tomorrow in New York City, in addition to using historical temperatures, you could also use barometric pressure, UV index, the percentage of cloud coverage in nearby geographic areas, wind speed, and other variables.
Learn how BigQuery ML can help your organization. View documentation.
Start building on Google Cloud with $300 in free credits and 20+ always free products.