Dan Steinberg's Blog
On Demand Introductory Videos
Download Now Instant Evaluation
Get Price Quote

How to Export TreeNet Plots to Other Software

An example of a partial dependency plot for a continuous predictor appears below.

For a categorical variable we obtain a bar chart such as:

Exporting TreeNet Plots

TreeNet Plots

There are times when users prefer to create their own versions of these plots and we occasionally receive tech support requests for a way to extract the numeric values from which the plots are generated. The answer is simple but in versions of SPM 6.6 and later you must use the command line to issue the command:


You can issue this command from an SPM Notepad (the preferred way, see the image below) or directly from the command prompt in the classic output window.Below we used the File menu item to select New Notepad and then typed in the command.

Translate Language Plots

Following this with File…Submit Window executes the command and produces XML like details for all plots generated by the TreeNet run. You will want these details in a separate file; the translate output is intended for a programmer to manipulate but you could cut and paste details for some plots if you must. The header provides some general information and the first few lines appear first.



Further down in the file you will find details for each plot. Below we show the first few lines for the continuous variable plot displayed above.


To plot these points in Excel, for example, you could just copy and paste them into a spreadsheet, sort them by the first column, and then request a scatter plot with a connecting line to obtain:

Plot points in Excel for TreeNet

For more than occasional exporting you will want to have a script written to process graph information in bulk and automatically. You could also produce your own smooths and extract other pertinent information. In one of our projects for modeling price sensitivity of products in a retail store we needed to process graphs for tens of thousands of products and we leveraged the TRANSLATE LANGUAGE=PLOTS for this purpose.

Educational Demos


Tags: Blog, TreeNet