BookmarkSubscribeRSS Feed

Capturing Output Tables from SAS Visual Forecasting 8.5

Started ‎07-22-2020 by
Modified ‎07-22-2020 by
Views 3,146

We frequently wish to capture the output tables from our forecasting projects.  With SAS Visual Forecasting 8.5, it's easy to do!  First, let’s review what tables are created.

 

image001.jpg

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

Exporting output tables from Visual Forecasting 8.5 is as simple as simple as 1, 2, 3.

  1. From the Model Studio Pipelines tab, right click on forecast node, and open Results
  2. Select Output Data tab, and select the table you want
  3. Click Save icon

Below we will go step by step through this process and how to find and access our tables once they are saved.  We'll also reveal an EVEN EASIER way to get your tables into Visual Analytics where you can explore and visualize them and use them in reports.

 

Let's review what the output attributes (columns) are for each table.

 

OUTFOR

  1. Time ID Values
  2. Actual Values
  3. Predicted Values
  4. Prediction Standard Errors
  5. Lower Confidence Limits
  6. Upper Confidence Limits
  7. Variable Name
  8. Prediction Errors

image002.jpg

 

OUTMODELINFO

  1. Variable Name
  2. Model
  3. Model Family
  4. Dependent Variable Transform
  5. Seasonal Model
  6. Trend Model
  7. Inputs Present
  8. Events Present
  9. Outliers Present
  10. Model Status
  11. Model Source

image003.jpg

 

OUTSELECT (All the OUTSTAT Plus Selected Status and Model Label)

  1. Variable Name
  2. Region
  3. Selection List
  4. Model
  5. Selected Status
  6. Degrees of Freedom Error
  7. Number of Observations
  8. Number of Observations Used
  9. Number of Missing Actuals
  10. Number of Missing Predicted Values
  11. Number of Model Parameters
  12. Total Sum of Squares
  13. Corrected Total Sum of Squares
  14. Sum of Square Error
  15. Mean Square Error
  16. Root Mean Square Error
  17. Unbiased Mean Square Error
  18. Unbiased Root Mean Square Error
  19. Mean Absolute Percent Error
  20. Mean Absolute Error
  21. R-Square
  22. Adjusted R-Square
  23. Amemiya’s Adjusted R-Square
  24. Random Walk R-Square
  25. Akaike Information Criterion
  26. Finite Sample Corrected Akaike Information Criterion
  27. Schwarz Bayesian Information Criterion
  28. Amemiya’s Prediction Criterion
  29. Maximum Error
  30. Minimum Error
  31. Maximum Percent Error
  32. Minimum Percent Error
  33. Mean Error
  34. Mean Percent Error
  35. Median Absolute Percent Error
  36. Geometric Mean Absolute Percent Error
  37. Minimum Predicted Percent Error
  38. Maximum Predicted Percent Error
  39. Mean Predicted Percent Error
  40. Mean Absolute Predicted Percent Error
  41. Median Absolute Predicted Percent Error
  42. Geometric Mean Absolute Predicted Percent Error
  43. Minimum Symmetric Percent Error
  44. Maximum Symmetric Percent Error
  45. Mean Symmetric Percent Error
  46. Mean Absolute Symmetric Percent Error
  47. Median Absolute Symmetric Percent Error
  48. Geometric Mean Absolute Symmetric Percent Error
  49. Minimum Relative Error
  50. Maximum Relative Error
  51. Mean Relative Error
  52. Mean Relative Absolute Error
  53. Median Relative Absolute Error
  54. Geometric Mean Relative Absolute Error
  55. Mean Absolute Scaled Error
  56. Minimum Absolute Error Percent of Standard Deviation
  57. Maximum Absolute Error Percent of Standard Deviation
  58. Mean Absolute Error Percent of Standard Deviation
  59. Median Absolute Error Percent of Standard Deviation
  60. Geometric Mean Absolute Error Percent of Standard Deviation
  61. Model Label

image004.jpg

 

OUTSTAT

 

All the same attributes as OUTSELECT except does not include Selected Status and Model Label.

 

OUTSUM

  1. Variable Name
  2. Time Series Length
  3. Number of Nonmissing Values
  4. Number of Missing Values
  5. Minimum Value of Series
  6. Maximum Value of Series
  7. Mean Value of Series
  8. Standard Deviation of Series
  9. Condition Code for Series

MERGED_ATTRIBUTES

 

All variables from all the other tables merged into one table plus:

  • Starting Time ID for Series
  • Ending Time ID for Series
  • Volume Volatility Class
  • Seasonal
  • Intermittent
  • Seasonal Intermittent
  • Retired
  • Short
  • Volume
  • Volatility
  • Demand Interval Measure
  • Volatility Measure
  • Status

OUTLOG

  1. _ERRNO_ Status
  2. Length of log content
  3. Log content

Let’s see how easy it is to export these tables!

 

We start with an already built SAS Visual Forecasting 8.5 model in Model Studio.

 

Here I’ll use the my Hurricane project, which I previously demonstrated in my previous article, Improve Accuracy by Adding Events in SAS Visual Forecasting 8.5 Model Studio.

FROM PIPELINES TAB

  1. From the Pipelines tab, Run Pipeline and then right click your modeling node. Select Results.

     

    image005.jpg

     

  2. Go to the Output Data tab. You see your list of output tables. Ensure that the first table OUTFOR is selected.

     

    image006.jpg

     

  3. On the far right is an icon to Manage Columns.

     

    image007.jpg

     

  4. In Manage Columns, you can hide or display columns at your convenience.

     

    image008.jpg

     

  5. To save the OUTFOR table as a CAS table, select the Save icon, or right click and select Save. It will be assigned a name, ending with OUTFOR.

     

    image009.jpg

     

  6. Go to Manage Data.

     

    image010 (1).png

     

  7. Go to the Data Sources tab.

     

    image011.jpg

     

  8. You see the file you saved is now listed under your Data Sources as a data set.

     

    image012.jpg

     

  9. You can now access that table from other SAS Viya applications. For example, open Visual Analytics (Explore and Visualize).

     

    image013.jpg

     

  10. Open a New Project, and select Add Data.

     

    image014.jpg

     

  11. Go to the Data Sources tab, and look under cas-shared-default, CASUSER(yourusername) to see the OUTFOR table. Ensure that Show unloaded tables is checked.

     

    image015.jpg

     

  12. Right click, Load the OUTFOR data set.

     

    image016.jpg

     

  13. Notice the lightning bolt icon, indicating that the data set is loaded.

     

    image017.jpg

     

  14. Select the loaded data set and click OK.

     

    You can now explore and/or report these results in SAS Visual Analytics.

     

    image018.jpg

     

  15. For example, we may want to plot prediction errors by date.

     

    image019.jpg

SHORT CUT TO EXPLORE AND VISUALIZE VISUAL FORECASTING OUTPUT TABLES

  1. Instead of Save, right click on OUTFOR and select Explore and Visualize.  (Or alternatively, use the Explore and Visualize icon to the right of the Save icon.)

     

    image020.jpg

     

  2. Notice this will give it the same file name as earlier.

     

    image021.jpg

     

  3. We are asked if we want to overwrite the existing table. Select Overwrite.

     

    image022.jpg

     

  4. By using Explore and Visualize instead of Save, we don’t have to add the step of loading the data.

TO EXPORT FROM PIPELINE COMPARISONS TAB

  1. Select the Pipeline you want to export output data for. Use the vertical ellipsis on the far right to Export output data.

     

    image023.jpg

     

  2. Leave the default table name and ensure that Promote table is checked. Click Export.

     

    image024.jpg

     

  3. Go to Manage Data (SAS Data Explorer), Data Sources, and we see our OUTPUT DATA.

     

    image025.jpg

     

  4. Let’s now go to Explore and Visualize (SAS Visual Analytics) to look at these data. We don’t see the loaded data (remember the lightning bolt tells us that the data are loaded). Select Refresh.

     

    image026.jpg

     

  5. The loaded table with the lightning bolt appears. Select the table and hit OK.

     

    image027.jpg

     

  6. Notice that only the OUTFOR table data are there. Where are the other tables? The OUTFOR table is the only table exported from the Pipeline Comparison tab.

     

    Let’s return and save our OUTSUM table.

     

    image028.jpg

     

    image029.jpg

     

    image030.jpg

TO DOWNLOAD SAS LOG

  1. In addition to the output tables, you can also easily get the SAS log.  To get the SAS log, right click on your forecasting node.

     

    image031.jpg

     

  2. Select Download log and the log will be downloaded.

     

    image032.jpg

     

  3. The log will be downloaded by default to your Downloads folder.

     

    image033.jpg

For More Information

Comments

If I am using the SAS Batch API for a SAS Visual Forecasting Project, where are the Output Tables written ?

How can I access them within Batch; especially the output data for the Champions Model. ? 

 

Hi Harald!  Your output tables will be written where your batch code sends them.  Check out this blog for some code examples:  Exporting pluggable modeling node results tables t... - SAS Support Communities.  Also, this email from Iman Vasheghani Farahani might also be helpful:

 

"You can see what the champion model is and export the respective OUTFOR table to any CASLIB you want. I highly recommend you follow that blog to get the tables you’re looking for. Alternatively, and if you cannot modify the modeling node codes (especially for built-in models like HF/PSNN), you can follow the steps coming below to get your tables. If you open the log for one of your modeling nodes, you should be able to locate notes like this when the session VF_SESSION connected to CAS. Once you find it, copy the CASLIB name (highlighted part) as we’ll need it later.

 

NOTE: The session VF_SESSION connected successfully to Cloud Analytic Services ivf.vfapp.sashq-d.openstack.sas.com using port 5570.

      The UUID is 815d00d3-3977-9441-a367-968e68e7638c. The user is imvash and the active caslib is

      Analytics_Project_cee08563-52fc-4750-a499-1a873baa4977.

NOTE: The SAS option SESSREF was updated with the value VF_SESSION.

NOTE: The SAS macro _SESSREF_ was updated with the value VF_SESSION.

NOTE: The session is using 0 workers.

 

Go to SAS Studio and submit the following commands:

 

cas mycas sessopts=(caslib="Analytics_Project_cee08563-52fc-4750-a499-1a873baa4977");

libname mylib cas sessref=mycas;

 

You should be able to see your tables in mylib. Note that mylib is linked to the caslib Analytics…, so you might want to save your table somewhere else, say in the CASUSER library. Following code in SAS Studio saves your tables (table_name) in CASUSER:

 

proc cas;

            table.save /

            table={caslib="Analytics_Project_cee08563-52fc-4750-a499-1a873baa4977", name="table_name"}

            caslib="CASUSER"

            name="table_name.sashdat"

            replace=true

            compress=true;

run;

 

You should bring them to memory before being able to make queries. Make a new cas session and use proc casutil to bring them in memory.

 

I hope it helps.

Iman"

And let me add a warning from Martin Schorter. 

 

"Be very careful [trying the code mentioned above] in a production environment. The internal libraries and structures of VF are subject to change. The implementation may break at any time.  

As Iman said, absolutely do not make any changes to the content in the project CASLIB or you might end up corrupting the project."

@BethEbersole 

 

This has been extremely helpful! One question, is there a dataset is savable to CAS that includes the FF or Final Forecast variable? I don't see it in the OUTFOR table, just the predicted values. The predicted values do not include override adjustments, so that's why I ask. Thanks

I would like to know as well, which table or what library holds the FF (final forecast) that includes overrides.  

Version history
Last update:
‎07-22-2020 07:11 PM
Updated by:
Contributors

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags