/
Technical User Reference (Optimization - Forecast)

Technical User Reference (Optimization - Forecast)

This logic contains some functions needed specifically for this Accelerator, such as reading its configuration from the application settings, applying the user filters in each part of the model, preprocessing the data for the charts, and many small helpers for the charts rendering. The elements ParametersUtils, TablesUtils, and LabelsUtils contain the names of many elements, tables and fields of the models.This section details the Model Class and the logics that the Forecast Accelerator deploys. Each step’s aim, outputs, and main reasons to modify the logics are explained. If there is a need to adjust the Python job, refer to Run Python Scripts.

In this section:

Forecast Model Class

The Forecast Model Class organizes a list of logics to create the model architecture. It is a JSON file that refers to some logics and it is transformed into an UI in the Pricefx platform that is organized in 5 steps:

  1. Definition − Maps the transactions source and configures the model.

  2. Additional Configuration − Allows the user to define up to 3 additional sources to be included in the model training data, defines the aggregation level for the forecasting, set the export parameters.

  3. Model Training − Checks the quality of the model after its training and defines the elasticity settings.

  4. Model Predictions − Forecasts quantity or revenue and shows prediction charts.

  5. Export Forecast - Export the production values in a Data Source.

There are two types of logics: calculation, which writes tables in the model, and evaluation, whose purpose is only to display some results. The standard Model Class definition is documented in Model Class (MC).

All the logics of the Forecast Model Class follow a standard naming convention: first FCT_ prefix, then the step name, then calc or eval, depending on the formula nature, then the tab it is referring to.

Library

The logic is FCT_library.

This logic contains functions needed specifically for this Accelerator, such as reading its configuration from the application settings, applying the user filters in each part of the model, preprocessing the data for the charts, and many small helpers for the charts rendering. The elements ParametersUtils, TablesUtils, and LabelsUtils contain the names of many elements, tables and fields of the models.

This lib is the place to change input names inside the model to reflect the user business vocabulary. LabelsUtils contains text that is shown in the UI, ParametersUtils and TablesUtilscontain table names and parameter names, respectively. Here you can also write functions to be used in different places of the model class.

Definition Step

This step runs one calculation and displays two tabs: Definition and Model Configuration.

Calculation: Generate the Parameter Table

The logic is FCT_1_Def_Calc_Fetch_Data.

This logic generates a parameter table containing default model training parameters. If the table already exists, it does nothing.

The TrainingParameters parameter table.

To change the default values in the table.

Definition Tab

The logics are FCT_1_Def_Eval_definition and FCT_1_Def_Eval_definition_configurator.

Model Configuration Tab

The logic is FCT_1_Def_Eval_model_configuration.

Additional Configuration Step

This step doesn’t run any calculations. It displays two tabs: Additional Sources and Aggregation Level.

Additional Sources Tab

The logics are FCT_2_Add_Eval_additional_sources and FCT_2_Add_Eval_configurator.

Aggregation Level Tab

The logic is FCT_2_Add_Eval_aggregation_level.

Model Training Step

This step runs the one calculation and displays the tabs Model Training Results, Train and Test Forecasts, Training Curves, and Elasticity Settings.

Calculation: Train the Model.

The logic is FCT_3_Train_Calc_TrainModel.

Model Training Results Tab

The logic is FCT_3_Train_Eval_model_training_results.

Train and Test Forecasts Tab

The logics are FCT_3_Train_Eval_train_test_forecasts and FCT_3_Train_Eval_configurator.

Training Curves Tab

The logic is FCT_3_Train_Eval_training_curves.

Elasticity Settings Tab

The logic is FCT_3_Train_Eval_elasticity_settings.

Model Predictions Step

This step runs the two calculations and displays the tabs Overview and Details.

First Calculation: Results

The logic is FCT_4_Pred_Calc_results.

Second Calculation: Postprocessing

The logic is FCT_4_Pred_Calc_post_proc.

Overview Tab

The logic is FCT_4_Pred_Eval_overview.

Details Tab

The logics are FCT_4_Pred_Eval_details and FCT_4_Pred_Eval_configurator.

Export Forecast Step

This step runs one calculation and displays one tab.

Calculation: Export Forecast Data Source

The logic is FCT_5_Export_Calc_ExportDS.

Dashboard

The logic is FCT_5_Export_Eval_Export_Configurator.

Evaluation

The model also has an evaluation logic, called FCT_model_evaluation. For more details about model evaluations see Query Optimization Engine Results | Using the Evaluator.