Forecasting overview
Forecasting is a technique where you analyze historical data in order to make an informed prediction about future trends. For example, you might analyze historical sales data from several store locations in order to predict future sales at those locations. In BigQuery ML, you perform forecasting on time series data.
You can perform forecasting in the following ways:
- By using the  AI.FORECASTfunction with the built-in TimesFM model . Use this approach when you need to forecast future values for a single variable, and don't require the ability to fine-tune the model. This approach doesn't require you to create and manage a model.
- By using the  ML.FORECASTfunction with theARIMA_PLUSmodel . Use this approach when you need to run an ARIMA-based modeling pipeline and decompose the time series into multiple components in order to explain the results. This approach requires you to create and manage a model.
- By using the ML.FORECASTfunction with theARIMA_PLUS_XREGmodel . Use this approach when you need to forecast future values for multiple variables. This approach requires you to create and manage a model.
 ARIMA_PLUS 
and ARIMA_PLUS_XREG 
time series models aren't actually single
models, but rather a time series modeling pipeline that includes multiple
models and algorithms. For more information, see Time series modeling pipeline 
.
In addition to forecasting, you can use ARIMA_PLUS 
and ARIMA_PLUS_XREG 
models for anomaly detection. For more information, see the following
documents:
- Anomaly detection overview
- Perform anomaly detection with a multivariate time-series forecasting model
You can use the  AI.EVALUATE 
function 
to evaluate forecasted data against actual values from historical data.
Compare the TimesFM and ARIMA 
models
 
 Use the following table to determine whether to use AI.FORECAST 
with the
built-in TimesFM model or ML.FORECAST 
with an ARIMA_PLUS 
or ARIMA_PLUS_XREG 
model for your use case:
AI.FORECAST 
with a TimesFM modelML.FORECAST 
with an ARIMA_PLUS 
or ARIMA_PLUS_XREG 
modelARIMA 
algorithm for the
      trend component, and a variety of other algorithms for non-trend
      components. For more information, see Time series modeling pipeline 
.ARIMA_PLUS 
or ARIMA_PLUS_XREG 
model is trained for each time series.CREATE MODEL 
statement and a
      function call.CREATE MODEL 
statement 
offers arguments that let you tune many model settings, such as the
      following: - Seasonality
- Holiday effects
- Step changes
- Trend
- Spikes and dips removal
- Forecasting upper and lower bounds
- Quick forecasts
- Need minimal setup
- Model needs fine tuning
- Need explainability for model output
- Model input needs more context
Recommended knowledge
By using the default settings of BigQuery ML's statements and functions, you can create and use a forecasting model even without much ML knowledge. However, having basic knowledge about ML development, and forecasting models in particular, helps you optimize both your data and your model to deliver better results. We recommend using the following resources to develop familiarity with ML techniques and processes:

