Tutorial: AutoAI univariate time series experiment
Tutorial: AutoAI univariate time series experiment Use sample data to train a univariate (single prediction column) time series experiment that predicts minimum daily temperatures. When you set up the experiment, you load data that tracks daily minimum temperatures for the city of Melbourne, Australia. The experiment will generate a set of pipelines that use algorithms to predict future minimum daily temperatures. After generating the pipelines, AutoAI compares and tests them, chooses the best performers, and presents them in a leaderboard for you to review. Data set overview The [Mini_Daily_Temperatures](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/de4d953f2a766fbc0469723eba0d93ef) data set describes the minimum daily temperatures over 10 years (1981-1990) in the city Melbourne, Australia. The units are in degrees celsius and the data set contains 3650 observations. The source of the data is the Australian Bureau of Meteorology. Details about the data set are described here: ![Daily Min Temperature Spreadsheet](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_table.png) * You will use the Min_Temp column as the prediction column to build pipelines and forecast the future daily minimum temperatures. Before the pipeline training, the date column and Min_Temp column are used together to figure out the appropriate lookback window. * The prediction column forecasts a prediction for the daily minimum temperature on a specified day. * The sample data is structured in rows and columns and saved as a .csv file. Tasks overview In this tutorial, you follow these steps to create a univariate time series experiment: 1. [Create a project](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep0) 2. [Create an AutoAI experiment](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep1) 3. [Configure the experiment](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep2) 4. [Review experiment results](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep3) 5. [Deploy the trained model](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep4) 6. [Test the deployed model](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-uni-tutorial.html?context=cdpaas&locale=enstep5) Create a project Follow these steps to download the [Mini_Daily_Temperatures](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/de4d953f2a766fbc0469723eba0d93ef) data set from the Samples and create an empty project: 1. From the navigation menu ![Navigation menu](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/navigation-menu.svg), click Samples and download a local copy of the [Mini_Daily_Temperatures](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/de4d953f2a766fbc0469723eba0d93ef) data set. 2. From the navigation menu ![Navigation menu](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/navigation-menu.svg), click Projects > View all projects, then click New Project. 1. Click Create an empty project. 2. Enter a name and optional description for your project. 3. Click Create. Create an AutoAI experiment Follow these steps to create an AutoAI experiment and add sample data to your experiment: 1. On the Assets tab from within your project, click New asset > Build machine learning models automatically. 2. Specify a name and optional description for your experiment, then select Create. 3. Select Associate a Machine Learning service instance to create a new service instance or associate an existing instance with your project. Click Reload to confirm your configuration. 4. Click Create. 5. To add the sample data, choose one of the these methods: * If you downloaded your file locally, upload the training data file, Daily_Min_Temperatures.csv, by clicking Browse and then following the prompts. * If you already uploaded your file to your project, click Select from project, then select the Data asset tab and choose Daily_Min_Temperatures.csv. Configure the experiment Follow these steps to configure your univariate AutoAI time series experiment: 1. Click Yes for the option to create a Time Series Forecast. 2. Choose as prediction columns: Min_Temp. 3. Choose as the date/time column: Date. ![Configuring experiment settings. Yes to time series forecast and min temp as the prediction column with Date as the date/time column.](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_run_configuration.png) 4. Click Experiment settings to configure the experiment: 1. In the Data source page, select the Time series tab. 2. For this tutorial, accept the default value for Number of backtests (4), Gap length (0 steps), and Holdout length (20 steps). Note: The validation length changes if you change the value of any of the parameters: Number of backtests, Gap length, or Holdout length. c. Click Cancel to exit from the Experiment settings. ![Experiment settings on Data Source page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_exp_settings.png) 5. Click Run experiment to begin the training. Review experiment results The experiment takes several minutes to complete. As the experiment trains, a visualization shows the transformations that are used to create pipelines. Follow these steps to review experiment results and save the pipeline with the best performance. 1. (Optional): Hover over any node in the visualization to get details on the transformation for a particular pipeline. ![Experiment summary generating pipelines](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_pipeline_build.png) 2. (Optional): After the pipelines are listed on the leaderboard, click Pipeline comparison to see how they differ. For example: ![Metric chart of pipeline comparison](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_pipeline_comparison.png) 3. (Optional): When the training completes, the top three best performing pipelines are saved to the leaderboard. Click View discarded pipelines to review pipelines with the least performance. ![Ranked pipeline leaderboard based on accuracy](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai_uni_pipeline_leaderboard.png) 4. Select the pipeline with Rank 1 and click Save as to create your model. Then, select Create. This action saves the pipeline under the Models section in the Assets tab. Deploy the trained model Before you can use your trained model to make predictions on new data, you must deploy the model. Follow these steps to promote your trained model to