1. Model Translation to SAS, C, Java, PMML
One of the advantages of working with the Salford Predictive Modeler or its components is that any SPM model can be exported to programming code in various languages including: SAS, C, Java, PMML and others.
Translation can be generated while a model is in memory, or from a previously saved model.
An effective way to deploy a predictive model to production is to translate it into a form that your environment can execute. You can translate a model from a saved grove using:
Model>Translate Model… menu item or the button on the toolbar.
You need to specify a Grove file to perform the translation. You can do this in an Open File Dialog by clicking the Open Grove File button. If you have a Grove file already open in the application, then the dialog will use it by default. The display associated with a grove usually shows the Translate button in the bottom right corner.
This is a handy way to translate a model you’re working with.
The rest of the controls in the dialog box allow you to configure the translation process.
Select model to translate
HARVEST ENGINE=<Engine Name>, SELECT <Model Selection parameters>
A Grove file can contain multiple models. For example, on the screenshot above, the grove contains 8 Models produced as a result of BATTERY ATOM. With this combo box, you can either specify an individual model, or request to score all the models at once as an ensemble.
- HARVEST command is quite versatile and flexible. To make further use of it, please consult the documentation.
Select Specific Model
HARVEST PRUNE <Model Specific parameters>
Many of the Predictive Analytics algorithms produce a group of related models. These models represent various tradeoffs between simplicity and accuracy. For more details, please see the documentation on a specific algorithm (CART, TreeNet, etc). Selecting the Specific Model group of controls allows you to either request an optimal model to be scored, or invoke a Model-specific selection dialog.
Save Output to file
By default, the translation results are printed to the Classic Output. You can request translation results to be saved as a file. The default extension is the conventional extension for the Translation Language currently selected.
TRANSLATE LANGUAGE = CLASSIC | SAS | C | PMML | JAVA | | HISTORY | TOPOLOGY
Choose the language that you would like your model to be translated into. You can choose from the following options:
- SAS – produces implementation of the model in SAS/STAT® software programming language.
- Classic – prints out Classic Output for the model. This way you can always review the Classic Output if the model was saved into a grove.
- C – produces implementation of the model in C programming language.
- PMML – translates the model into Predictive Model Markup Language.
- Java – produces implementation of the model in Java language.
- Topology – produces a set of FORCE commands for each split in a CART model being translated. You can then apply these commands to a compatible dataset and see whether and how terminal nodes will be split for the new data.
TRANSLATE SMI = "SAS missing value string", SBE = "SAS begin label", SDO = "SAS done label", SNO = "SAS node prefix", STN = "SAS terminal node prefix", SNE = "SAS TreeNet prefix"
When translating into SAS, you may also specify additional SAS-related preferences. The definitions should become clear once you look at a sample SAS output.
In addition, the SCORE function allows one to take any model (in memory or previously saved) and apply it to the data of one’s choosing. Models are saved to "grove" (.GRV) files on request and then can be used freely in any new session of SPM.
Link to SPM Infrastructure (Page 34, Scoring / Page 40, Model Translation):
2. Mac Installation
There are three ways to run the Salford Predictive Modeler (SPM) on Mac: Bootcamp, Parallels, and VMware.
When using Bootcamp on a Mac, the computer will boot up with whatever version of Windows is currently installed. It is not a virtual machine, so you can't have both Mac and Windows running simultaneously, you must reboot to switch. The Mac OS and the Windows OS reside on separate drives (or drive partitions). Our products will run normally on a Mac with Bootcamp, so long as the installed version of Windows is compatible--e.g. Windows XP or later.
The next two products that permit Intel-based Macs to run Windows programs are Parallels and VMware. If one of these virtual machine software options is installed, SPM (and our other products) will run on a Windows OS. Our team has tested both VMware and Parallels software, and both work very well. The team routinely uses VMware on Mac setups with satisfactory results. Virtual machines such as Parallels and VMware have the advantage of allowing both Mac OS and Windows to run simultaneously. There is little, if any, performance penalty when compared to Bootcamp.
Bottom line: SPM runs on both Bootcamp and virtual machines.
Also, be sure to check out our Systems Requirements for SPM (Windows/Linux, Unix):
3. Accessing SPM’s Built-in Sample Data Sets
Data can be hard to come across, given the current concerns over privacy and confidentiality; useful data is an even tougher find. With a free evaluation (or licensed version) of SPM, you are also provided with several example data sets to utilize.
To locate these data sets, navigate to the folder in which SPM has been installed. By default, this should be in C:\Program Files\Salford Systems\Salford Predictive Modeler 7.0:
Within this folder, there are three locations where you can find example data:
- C:\Program Files\Salford Systems\Salford Predictive Modeler 7.0\Docs\Examples
- C:\Program Files\Salford Systems\Salford Predictive Modeler 7.0\Sample Data
- C:\Program Files\Salford Systems\Salford Predictive Modeler 7.0\Sample Data\More Samples
In these three locations, you will find numerous datasets spanning many different industries. Many of these datasets, and command files, are referenced in our online help manuals (SPM User Guide) and tutorial videos (http://www.salford-systems.com/videos).
We hope you find this post informative and supportive. Let us know if you have any questions or comments!