Time series analysis includes methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series allows you to analyze major patterns related to trends, seasonality, cyclicity, and irregularity. With time-series forecasting, you can use a model to predict future values based on previously observed values. Time series are widely used for non-stationary data, like economic, weather, stock price, and retail sales.
This tutorial demonstrates how to quickly build a time-series model using the Findability Platform Predict Plus operator from Red Hat Marketplace using a dataset that shows the how the prices differ over a period of time at a particular retail store outlet.
- Use the Findability Platform Predict Plus from Red Hat Marketplace
- Set up a time-series model on Findability Platform Predict Plus
- Learn how to configure the training and forecast parameters
- View and analyze the time-series results
To complete the steps in this tutorial, you need to install the FP Predict + operator from Red Hat Marketplace. Please refer to the tutorial Get started with Findability Predict Plus on Red Hat Marketplace for instructions.
Completing this tutorial should take about 40 minutes.
Steps to build the time series model
Step 1. Create a new time-series job
Log in to your FP Predict + Operator instance.
A prompt will pop up asking if your data contains a time stamp. Select Yes.
Another prompt will pop up asking if you will be predicting values. Select Yes.
Step 2. Configure the time-series model
To configure the time-series model for this tutorial, we created two sample CSV files for you to work with. You will need to download them before you can start.
Enter the details as follows:
- For Job Name, enter
TS. (Avoid special characters in the name)
- Set the Dataset location to be
- For Daily Interval, set as
- For Tasks, select
Model + Forecast.
- For the training file, upload the file from the downloaded
Set the Target Variable as
Upload the forecast file from the downloaded file
- Set the Timestamp variable as
- Set the Timestamp Format as
- For Job Name, enter
Note: It will take about 10 minutes to set up the model, please wait and don’t refresh the page until it’s over.
Step 3. Analyze your output
After the model is set up completely, you will receive an output like the graph below that shows the time-series of prices over the time period 2013 to 2015:
Select the Analytics icon to analyze your results.
- The first table on the top left corner depicts the actual vs. predicted time intervals and the difference in prediction for each time interval. Note that it provides only the head values of the result table.
- The graph on the top right represents the same output as received on the dashboard.
Forecast Metricsprovides measures of the trained model using techniques such as Mean Error, Root Mean Square, Mean Percentage Error, Mean Absolute Percentage Error ,and Mean Absolute Scaled Error. These measures allow you to evaluate how well the underlying model is trained and how well it forecasts.
- The log table provides metadata of the trained file, such as the number of rows and the time it takes to train.
The last table is about the
Important Rowssince ours is a time-series model with only one underlying feature distribution.
Important pointers on the datasets
- There should only be 2 other columns apart from the date — Row sequence number and Target Variable.
- Ensure the time interval is correctly maintained through the training and forecast data. For exmaple, if you set the time interval as “daily”, your dataset must contain only one record for a particular day.
- Additionally, if your interval is set to “daily”, your forecast data must have a forecast for every day without a gap.
If you encounter the following error, clear your browser cache or try in another browser.
For further reference, look at the datasets used in this tutorial.
In summary, this tutorial helps you to understand how to perform time-series analysis with Red Hat Market Place using the FP Predict + Operator.