Creating a time series anomaly prediction (Beta)
Creating a time series anomaly prediction (Beta) Create a time series anomaly prediction experiment to train a model that can detect anomalies, or unexpected results, when the model predicts results based on new data. Tech preview This is a technology preview and is not yet supported for use in production environments. Detecting anomalies in predictions You can use anomaly prediction to find outliers in model predictions. Consider the following scenarios for training a time series model with anomaly prediction. For example, suppose you have operational metrics from monitoring devices that were collected in the date range of 2022.1.1 through 2022.3.31. You are confident that no anomalies exist in the data for that period, even if the data is unlabeled. You can use a time series anomaly prediction experiment to: * Train model candidate pipelines and auto-select the top-ranked model candidate * Deploy a selected model to predict new observations if: * A new time point is an anomaly (for example, an online score predicts a time point 2022.4.1 that is outside of the expected range) * A new time range has anomalies (for example, a batch score predicts values of 2022.4.1 to 2022.4.7, outside the expected range) Working with a sample To create an AutoAI Time series experiment with anomaly prediction that uses a sample: 1. Create an AutoAI experiment. 2. Select Samples. ![Select the Samples](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai-ts-ad1.png) 3. Click the tile for Electricity usage anomalies sample data. 4. Follow the prompts to configure and run the experiment. ![Samples output](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/images/autoai-ts-ad2.png) 5. Review the details about the pipelines and explore the visualizations. Configuring a time series experiment with anomaly prediction 1. Load the data for your experiment. Restriction: You can upload only a single data file for an anomaly prediction experiment. If you upload a second data file (for holdout data) the Anomaly prediction option is disabled, and only the Forecast option is available. By default, Anomaly prediction experiments use a subset of the training data for validation. 2. Click Yes to Enable time series. 3. Select Anomaly prediction as the experiment type. 4. Configure the feature columns from the data source that you want to predict based on the previous values. You can specify one or more columns to predict. 5. Select the date/time column. 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, open the Experiment settings pane. Options that are not available for anomaly prediction experiments are unavailable. General prediction settings On the General panel for prediction settings, configure details for training the experiment. Field Description Prediction type View or change the prediction type based on prediction column for your experiment. For time series experiments, Time series anomaly prediction is selected by default. Note: If you change the prediction type, other prediction settings for your experiment are automatically changed. Optimized metric Choose a metric for optimizing and ranking the pipelines. Optimized algorithm selection Not supported for time series experiments. Algorithms to include Select [algorithms](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/autoai-ts-ap.html?context=cdpaas&locale=enimplementation) based on which you want your experiment to create pipelines. The algorithms support anomaly prediction. Pipelines to complete View or change the number of pipelines to generate for your experiment. Time series configuration details On the Time series pane for prediction settings, configure the details for how to train the experiment and generate predictions. Field Description Date/time column View or change the date/time column for the experiment. Lookback window Not supported for anomaly prediction. Forecast window Not supported for anomaly prediction. Configuring data source settings To configure details for your input data, open the Experiment settings panel and select the Data source. General data source settings On the General panel for data source settings, you can choose options for how to use your experiment data. Field Description Duplicate rows Not supported for time series anomaly prediction experiments. Subsample data Not supported for time series anomaly prediction experiments. Text feature engineering Not supported for time series anomaly prediction experiments. Final training data set Anomaly prediction uses a single data source file, which is the final training data set. Supporting features Not supported for time series anomaly prediction experiments. Data imputation Not supported for time series anomaly prediction experiments. Training and holdout data Anomaly prediction does not support a separate holdout file. You can adjust how the data is split between training and holdout data. Note: In some cases, AutoAI can overwrite your holdout settings to ensure the split is valid for the experiment. In this case, you see a notification and the change is noted in the log file. Reviewing the experiment results When you run the experiment, the progress indicator displays the pathways to pipeline creation. Ranked pipelines are listed on the leaderboard. Pipeline score represents how well the pipeline performed for the optimizing metric.