Lesson 01

Forecasting Using Model Studio in SAS® Viya®
Lesson 01, Section 2 Practice: Creating a Project and a Visualization

Answer the following questions based on the baseline sales forecast project and the LG_ATTRIBUTES table.

  1. How many high-margin (HIG) product name series are in the modeling data?

    Solution:

    • Select Reset to remove any previously applied filters.
    • Expand the margin_cat attribute.
    • Select the HIG category.

    There are 109 product name series that are high margin.

  2. How many high-margin product name series are there in the South customer region?

    Solution:

    • Select the South customer region.

    There are 18 high-margin series in the South customer region.

  3. Characterize the combined, high-margin product name sales variation in the South and Mid Atlantic customer regions from the start of 2014 until the end of the data.

    Solution:

    • Add Mid Atlantic to the Cust_Region filter. There are 40 high-margin product name series in the South and Mid Atlantic customer regions.
    • Click the Show button in the top right corner of the plot, and then select Show overview axis to help focus on the time period of interest.
    • Move the left overview axis tab over to JAN2014 to focus on the time period of interest.

    Beginning in JAN2014, average sales for high-margin product names in these regions are between 400 and 500 units, and they appear to be trending up slightly. Placing your mouse pointer on the three highest peaks in demand reveals that these spikes correspond to the following intervals; NOV2014, JAN2015, and APR2016. Because sales peaks in the previous history do not correspond to these months, these peaks are probably an artifact of promotional activity, and not seasonal variation in the data.



Lesson 02

Forecasting Using Model Studio in SAS® Viya®
Lesson 02, Section 5 Practice: Working with Pipelines

Answer the following questions based on the results from the previous practice.

  1. Based on the results of the Naïve model forecasting node, describe the distribution of the generated MAPE statistics for the forecasts generated by the naive forecasting models.

    Solution:

    • Expand the MAPE Distribution pane.
    • Move the cursor over the bar (or bars) with the greatest Percent values.

    The MAPE distribution for the naïve models is close to being multi-modal. Its peak has a MAPE value just above 8.9.

  2. Use the modeling results generated in Pipeline 1 to answer the following question: Does the choice of naïve forecasting model seem appropriate?

    Solution:

    The Model Type chart shows that only about 34% of the models accommodate a seasonal pattern. The seasonal random walk might not be the best choice.

  3. Change the naïve model type to Moving average and rerun the pipeline. Describe any changes to the distribution of MAPE values that result.

    Note: The results in the rest of this lesson are based on the choice of a Seasonal random walk for the Naïve model type.

    Solution:

    • Change Naïve model type to Moving average in the Naïve forecasting node options.
    • Rerun the pipeline. Open the results of the Naïve model forecasting node.

    The distribution of MAPE values has changed. The primary difference is some relatively large generated MAPE values.



Forecasting Using Model Studio in SAS® Viya®
Lesson 02, Section 5 Practice: Comparing Pipelines

Answer the following question based on the pipeline comparison results from the previous demonstration.

  1. What is the mode of the MAPE distribution for each of the two pipelines?

    Solution:

    The mode for Pipeline 1 is about 5.28. The mode for the Naïve Model Forecasts pipeline is about 11.56.



Lesson 03

Forecasting Using Model Studio in SAS® Viya®
Lesson 03, Section 1 Practice: Hierarchical Forecasting

Answer the following questions based on the results from the previous demonstration.

  1. Compare the MAPE distributions at the productline and productname levels in the Hierarchical Forecasting results. At what level of the hierarchy is the best fit to the data obtained?

    Solution:

    The aggregated MAPE and MAPE distribution results indicate that the productline level of the hierarchy has the best fit to the data of the two levels shown.

  2. Is the result that you found above ubiquitous in forecasting? Provide some insight into why this result occurred.

    Solution:

    Yes, this result is fairly common. Series at the base level of the hierarchy are typically sparse and noisy. As the data in the middle and upper levels of the hierarchy are created through the process of aggregation, series become less sparse, and systematic relationships between the target and input variables tend to become easier to detect.



Forecasting Using Model Studio in SAS® Viya®
Lesson 03, Section 2 Practice: Using a Custom Pipeline

  1. Create a new project, TEST custom pipelines, based on the LOOKINGGLASS_FORECAST table. Generate forecasts using the custom LG hierarchical forecasting with combined models pipeline that was saved previously.

    Solution:

    1. Starting from the main page in Model Studio, create a new project, and name it TEST custom pipelines. This project uses the same in-memory tables and variable metadata as the project created earlier.

    2. Set the type to Forecasting and provide a reasonably detailed description.

    3. Navigate to the LOOKINGGLASS_FORECAST table on the Available tab and click OK.

      Note: If the LOOKINGGLASS_FORECAST table is not on the Available tab, you need to load it into memory following steps shown previously in the course.

    4. Assign variable roles. Txn_Month is the time variable, the dependent variable is sale, and the BY variables are productline and productname. Set the hierarchical reconciliation level to productline.

    5. Select and edit price, discount, and cost. Set the role of these variables to Independent, and change Usage in system-generated models to Maybe.

    6. Navigate to the Pipelines tab and select New Pipeline. Name the pipeline and browse the available templates.

    7. Select the saved pipeline. Click OK

    8. Click Save, and then run the new pipeline to reproduce the results generated in the previous practice.



Lesson 04

Forecasting Using Model Studio in SAS® Viya®
Lesson 04, Section 1 Practice: Using the Filter Option to Create a Histogram

Perform the following task, building on the results from the previous demonstration.

  1. Use the Filter option in SAS Visual Analytics to create a histogram of prediction errors for productline, Line01 in the LG HIERARCHY FORECAST_OUTFOR in-memory table.

    Note: It is to your advantage to take notice of extreme departures from normality.

    Solution:

    • From the histogram shown in the previous demonstration, select Filters from the menu on the right side of the workspace.
    • Select Name of product line as the variable and then select Line01. Do this by first deselecting all and then reselecting Line01 only.


    The histogram changes on the fly to show the selected subset of prediction errors.