Mission 13 - Comparing Predictions
Estimated time for completing this mission: 30 mins
Learning Objective
Creating charts with advanced functionality in App Designer.
BLOX used in this mission:
Logic BLOX
- MyData/FinalData
- AI/Regression Model
- AI/Time Series Model
- Database/Group By
App BLOX
- Chart
- Panel
- Input
- Button
- Label
- Multiselect
Data
The same data set will be used as for the previous exercise. In case you do not have the data set you can download it here: FinalData.xlsx
Steps
Please refer to the Navigation Guide to perform the steps below
App Designer:
- Import the dataset from Data section to Module4 folder
- In Module4 create new app named Comparing Predictions
- Include all the BLOX which are mentioned in the description above as App BLOX
- Make the "panel" BLOX large enough to fit content in it
- Drag and drop all the necessary components into the panel (2x chart, 2x multiselect, 4x label, 2x button) and arrange them in proper order (see the image below for help)
6. In App Designer open logic view and drag and drop all the necessary BLOX
7. First, connect the first button to the "FinalData" BLOX
8. Next, connect the data to "Group By" BLOX, specify the column ("ORDERDATE") and operation ("Sum")
9. Connect the result from "Group By" to 'Historical Data' input of "Train Series Model", specify 'Time Variable' ("ORDERDATE"), 'Time Format' (%Y/%m/%d), 'Target Variable' ("SALES"), 'Look Back Window Size' (50), 'Training Intensity' ('Medium') and 'Model Name'
10. In the 'Train Series Model' left sidebar, open "Feature Variables" input, and connect "Multiselect" element to it
Hint
Multiselect BLOX combines your chosen options to a list with comas. Double click on the BLOX, and add more items with the "+Add" sign. Name all items the same as the column names in the "Group By" function as we are going to use these as an input for both the Regression and Time Series function.
11. Now connect the output ('Compare Graph') from 'Train Series Model' to the input of 'Chart' element
12. Next repeat the steps (7, 8) for second 'Chart' element
13. Then, connect the output from 'Group By' to 'Regression Model' BLOX's 'Learning Data' input
14. From 'Multiselect' element, connect to 'Features' from the 'Regression Model' BLOX
15. Then specify 'Target' as SALES, 'Exponential Degree' as Fifth Power, 'x is time series' to no and give a name to the model
15. Now, connect the 'Line Chart' output from the 'Regression Model' to the second 'Chart' element
16. Finally run the app, and play around with the two models and the different feature variables
Results and Summary
From the results, it is clear that the regression model fit the data better. Different data require different models, that is why it is crucial to have all these tools available when it comes to prediction.



