Perform a Forecast analysis when you don’t know how to coding
By: Neeraj Dhanraj
Tags: Forecasting, Time Series Analysis, R, Data, Data Science

Perform a Forecast analysis when you don’t know how to coding

Introduction to a website for a forecast analysis.

Photo by Franck V. on Unsplash

Background

Time series analysis is one of the vital parts of the Data Science techniques. It plays an important role in many applications in several domains such as energies, banking, finance, healthcare, education, environment, resource management, etc. There are several tools for time series forecasting, prediction, and performance evaluations. Time series analysis majorly characterized as supervised methods, where the time series is segmented into two parts, i.e., training and testing. The training part should be the longer part, say 70 to 90% initial values in the time series on which time series methods are modeled (Find some example here). The leftover last part of the time series is used for evaluation purposes, on which forecasted values are compared and based on it the accuracy of a method is evaluated.

The R and Python are the leading languages for such analysis. The testbench like ForecastTB makes such analysis more user-friendly and reproductive. So far, it is a challenging task for users who are not used to the coding skills to perform such analysis. This post is introducing a website (shiny app) to use the features of the ForecastTB package for the users who are not familiar with the coding. Let’s go the procedure step by step.

Hands-on:

Step 1: Go through the website: https://psfonline.shinyapps.io/ForeCastTB/

It will startup with an option to upload your time series as shown below:

Step 2: Upload a time series dataset

The user can upload the time series that he wants to use for the forecast analysis. The time series should be .csv or .xls or .txt files.

By default, the app can use the ‘nottem’ time series (a standard time series) by ticking in the box named, ‘use default dataset’. After uploading the time series dataset, it shows some initial values of the time series (up panel)and its statistical characteristics (down panel) as shown in the following image:

Step 3: Forecast analysis:

After uploading the time series, click on ‘Forecast’ tab shown in the left panel. It will bring you to the new tab, where one needs to update several details as shown in the following image:

By default, it uses ARIMA method, but the user can append several methods in the study with the following two options:

By selecting the methods which are available in the system. There are three default methods available in the present version of the website. (Users can expect more number of forecasting methods embedded in the website in the near future.)

2. By adding additional forecasting methods in the system. For this action, click on the ‘Add New Method’ tab and it opens up a new window as shown below:

For user reference, an example is provided below each input box. There is three input box for adding each new method in the system. In the first box, the user needs to provide a function that takes time series data and ‘nval’ as a input paraments. The ‘nval’ is the number of values to be forecasted. This function must be able to return the string of the forecasted values of length ‘nval’. The second and third boxes are the method names of the newly introduced methods. Finally, click on the ‘ADD’ button and it will append a new method in the system as shown in the following figures:

Step 4:

Let’s move on to the next parameter, i.e., the ‘Prediction parameter’. If the time series uploaded in the system has multiple columns, then the user can select the targeted column through this parameter. By default, the system will select the first column of the dataset.

Step 5:

After selecting the appropriate column, select the horizon of prediction and length of the dataset to be used for analysis by two sliders provided in the window.

Step 6:

Select the forecasting strategy for the analysis. By default, the ‘Recursive’ strategy is used, but anytime, users can use the ‘RirRec’ one.

Step 7:

After setting the input parameters, check the forecasting result plots and compare the performance of each method.

Step 8:

The users can check the results in tabular form by clicking on ‘Numerical Results’ tab:

Step 9:

Further, a polar plot showing forecasted values is shown in the system. This plot can help users to understand that after what horizon, the performance of a method is started degrading.

Step 10: Report Generation

The whole analysis can be saved as a summary with a single click on the ‘Generate Report’ button.

Concluding Remarks:

The website discussed in this post can be useful for a user with limited or no knowledge of the coding. Also, it can benefit regular programer for a quick intuitive time series analysis. I hope the readers like the post and for any query feel free to contact me.