Building a time series experiment
Building a time series experiment Use AutoAI to create a time series experiment to predict future activity, such as stock prices or temperatures, over a specified date or time range. Time series overview A time series experiment is a method of forecasting that uses historical observations to predict future values. The experiment automatically builds many pipelines using machine learning models, such as random forest regression and Support Vector Machines (SVMs), as well as statistical time series models, such as ARIMA and Holt-Winters. Then, the experiment recommends the best pipeline according to the pipeline performance evaluated on a holdout data set or backtest data sets. Unlike a standard AutoAI experiment, which builds a set of pipelines to completion then ranks them. A time series experiment evaluates pipelines earlier in the process and only completes and test the best-performing pipelines. ![AutoAI time series pipeline generation process](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/ts-pipelines.png) For details on the various stages of training and testing a time series experiment, see [Time series implementation details](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-timeseries-details.html). Predicting anomalies in a time series experiment You can configure your time series experiment to predict anomalies (outliers) in your data or predictions. To configure anomaly prediction for your experiment, follow the steps in [Creating a time series anomaly prediction model](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-ap.html). Using supporting features to improve predictions When you configure your time series experiment, you can choose to specify supporting features, also known as exogenous features. Supporting features are features that influence or add context to the prediction target. For example, if you are forecasting ice cream sales, daily temperature would be a logical supporting feature that would make the forecast more accurate. Leveraging future values for supporting features If you know the future values for the supporting features, you can leverage those future values when you deploy the model. For example, if you are training a model to forecast future t-shirt sales, you can include promotional discounts as a supporting feature to enhance the prediction. Inputting the future value of the promotion then makes the forecast more accurate. Data requirements These are the current data requirements for training a time series experiment: * The training data must be a single file in CSV format. * The file must contain one or more time series columns and optionally contain a timestamp column. For a list of supported date/time formats, see [AutoAI time series implementation details](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-timeseries-details.html). * If the data source contains a timestamp column, ensure that the data is sampled at uniform frequency. That is, the difference in timestamps of adjacent rows is the same. For example, data can be in increments of 1 minute, 1 hour, or one day. The specified timestamp is used to determine the lookback window to improve the model accuracy. Note:If the file size is larger than 1 GB, sort the data in descending order by the timestamp, and only the first 1 GB is used to train the experiment. * If the data source does not contain a timestamp column, ensure that the data is sampled at regular intervals and sorted in ascending order according to the sample date/time. That is, the value in the first row is the oldest, and the value in the last row is the most recent. Note: If the file size is larger than 1 GB, truncate the file so it is smaller than 1 GB. * Select what data to use when training the final pipelines. If you choose to include training data only, the generated notebooks will include a cell for retrieving the holdout data used to evaluate each pipeline. Choose data from your project or upload it from your file system or from the asset browser, then click Continue. Click the preview icon ![AutoAI preview data set icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai-preview-icon.png), after the data source name to review your data. Optionally, you can add a second file as holdout data for testing the trained pipelines. Configuring a time series experiment When you configure the details for an experiment, click Yes to Enable time series and complete the experiment details. Field Description Prediction columns The time series columns that you want to predict based on the previous values. You can specify one or more columns to predict. Date/time column The column that indicates the date/time at which the time series values occur. Lookback window A parameter that indicates how many previous time series values are used to predict the current time point. Forecast window The range that you want to predict based on the data in the lookback window. The prediction summary shows you the experiment type and the metric that is selected for optimizing the experiment. Configuring experiment settings To configure more details for your time series experiment, click Experiment settings. General prediction settings On the General panel for prediction settings, you can optionally change the metric used to optimize the experiment or specify the algorithms