cancel
Showing results for 
Search instead for 
Did you mean: 
himanshu_negi
Sisense Team Member
Sisense Team Member

Problem Statement:

Sisense supports forecasting/predicting future values based on historical data as a feature in the Sisense widget. More information about forecasting can be found here

Sisense forecasting relies on Sisense's Cloud Service for data processing. Historical data selected by a user is sent to the Sisense Cloud Service, where it's processed by machine-learning algorithms and returned as a forecast. If you do not want the data to be sent outside your Sisense environment, an option is to use Custom Code Auto ML Notebooks for forecasting. In Notebooks, a user can define their input parameters based on their data and train their machine learning model for use as predictive analytics. The code is based on your data and requirements and uses the ARIMA/SARIMA algorithm. Notebooks use hyperparameter optimization via grid search to get the optimal ARIMA (AutoRegressive Integrated Moving Average) or SARIMA (Seasonal AutoRegressive Integrated Moving Average) values. Then the best model is selected based on BIC scores.

 

Solution:

Please note, The forecasting notebook is not pre-installed. Access, copy, and download the below files here to paste into your environment.

  1. Manifest file (Forecast.json)
  2. Forecasting Code (Forecast.ipynb)

First,  enable the custom code if not done already. Go to Admin > Feature management to enable the custom code.

 

himanshu_negi_0-1658244535725.png


There are two ways to move the files; via ssh or UI.

  • SSH

Download the files and create a folder (Forecast) in the below linux directory and paste the files

/opt/sisense/storage/notebooks/custom_code_notebooks/notebooks

 

himanshu_negi_1-1658244535726.png

 

  • UI

From UI go the below path and create a folder with the files

Admin > FileManagement > notebooks > custom_code_notebooks > notebooks > <folder>

 

himanshu_negi_2-1658244535721.png


Once the files are moved, follow the below steps:

1. Go to the data model and add the custom code notebook (auto_SARIMAX_time_series_forecasting)

 

himanshu_negi_3-1658244535721.png

2. Read the notebook and input parameters descriptions ('i' icon) before passing the values.

 

himanshu_negi_4-1658244535696.png

3. You can also check the code by clicking Open in Jupyter Notebooks. After providing the values, click done to create a custom code table in the Elastic Cube.                                                    

himanshu_negi_5-1658244535727.png



himanshu_negi_6-1658244535695.png

4. Build the elasticube by either using Replace All or Changes Only. Once the build is successful, preview the new custom code table.


himanshu_negi_7-1658244535727.png

5. Finally, use the column to create a widget inside your dashboard.


himanshu_negi_8-1658244535793.png


Conclusion: 

With this solution, you now have the ability to use forecasting without sending your data outside the Sisense environment, which may cause security restrictions in your organization. This is just one example of a univariate time series model. With this custom code feature in Sisense, you can build your own Machine Learning model for forecasting and other supervised learnings like regression or classification problems.

Rate this article:
Version history
Last update:
‎03-02-2023 10:12 AM
Updated by: