Output Created by the Score Code Export Node

Results Window

Using the values set in the Properties panel (Figure 3.3), the Score Code Export node creates the following output in the Results window:
Results Using Sample Properties
Results Using Sample Properties

Output Files

The Score Code Export node writes the following output files, and a format catalog, if applicable, to the location specified by the Output Directory property. These files are used as input to the %INDB2_PUBLISH_MODEL macro that creates the scoring functions.
File or Folder
Description
score.sas
SAS language score code created by SAS Enterprise Miner. This code can be used directly in a SAS program. A sample program based on the properties shown in Figure 3.3 looks like this:
data testout ; 
   set simpletest.scoredata ;
   %include “c:\models\simpletest\score.sas”;
run;
score.xml
A description of the variables that are used and created by the scoring code. XML files are created by a machine process for the use of machine processes. Do not edit the XML file.
Restriction: The maximum number of input variables for a scoring function is 128.
emoutput.xml
A description of the final variables that are created by the scoring code. This file can be kept for decision-making processes. These variables include the primary classification, prediction, probability, segment, profit, and loss variables created by a data mining process. The list does not include intermediate variables created by the analysis. For more information about these variables, see Fixed Variable Names.
Note: The emoutput.xml file is not used by the %INDB2_PUBLISH_MODEL macro.
scoredata.sas7bdat
A ten-row sample of the scored data set showing typical cases of the input attributes, intermediate variables, and final output variables. Use this data set to test and debug new scoring processes.
Note: The scoredata.sas7bdat file is not used by the %INDB2_PUBLISH_MODEL macro.
traindata.sas7bdat
A ten-row sample table of the training data set showing typical cases of the input attributes used to develop the score code.
Note: The traindata.sas7bdat file is not used by the %INDB2_PUBLISH_MODEL macro.
Format catalog
If the training data contains SAS user-defined formats, the Score Code Export node creates a format catalog. The catalog contains the user-defined formats in the form of a look-up table. This file has an extension of .sas7bcat.

Output Variables

The score code produced by SAS Enterprise Miner creates both intermediate variables, such as imputed values of missing values, transformations, and encodings; and output variables, such as predicted value and probability. Any of these created variables can be used in a scoring process.
Tip
The number of input parameters on a scoring function has a direct impact on performance. The more parameters there are, the more time it takes to score a row. A recommended best practice is to make sure that only variables that are involved in a model score evaluation are exported from SAS Enterprise Miner.
The most important output variables for the scoring process follow a naming convention using a prefix, as shown in the following table.
Role
Type
Prefix
Key
Suffix
Example
Prediction
N
P_
Target variable name
P_amount
Probability
N
P_
Target variable name
Predicted event value
P_purchaseYES
P_purchaseNO
Classification
$
I_
Target variable name
I_purchase
Expected Profit
N
EP_
Target variable name
EP_conversion
Expected Loss
N
EL_
Target variable name
EL_conversion
Return on Investment
N
ROI_
Target variable name
ROI_conversion
Decision
$
D_
Target variable name
D_conversion
Decision Tree Leaf
N
_NODE_
_NODE_
Cluster number or SOM cell ID
N
_SEGMENT_
_SEGMENT_

Fixed Variable Names

The Score node of SAS Enterprise Miner maps the output variable names to fixed variable names. This mapping is appropriate in cases where there is only one prediction target or one classification target. In other cases, refer to the output variable names described in the previous table.
Using the fixed variable names enables scoring users to build processes that can be reused for different models without changing the code that processes the outputs. These fixed names are listed in the emoutput.xml file and are described in the following table. Most scoring processes return one or more of these variables.
Role
Type
Fixed Name
Description
Prediction
N
EM_PREDICTION
The prediction value for an interval target.
Probability
N
EM_PROBABILITY
The probability of the predicted classification, which can be any one of the target variable values.
Probability
N
EM_EVENTPROBABILITY
The probability of the target event. By default this is the first value in descending order. This is often the event of interest. The user can control the ordering in SAS Enterprise Miner.
Classification
$
EM_CLASSIFICATION
The predicted target class value.
Expected Profit
N
EM_PROFIT
Based on the selected decision.
Expected Loss
N
EM_LOSS
Based on the selected decision.
Return on Investment
N
EM_ROI
Based on the selected decision.
Decision
$
EM_DECISION
Optimal decision based on a function of probability, cost, and profit or loss weights.
Decision Tree Leaf, Cluster number, or SOM cell ID
N
EM_SEGMENT
Analytical customer segmentation.

SAS Enterprise Miner Tools Production of Score Code

The following table shows the types of score code created by each node in SAS Enterprise Miner. Users can develop their own nodes, known as extension nodes, which can create either SAS DATA step or SAS program score code. However, this code is not converted to PMML, C, or Java.
Node
SAS DATA Step
SAS Program
PMML
C
Java
DB2
Sample
Input Data
*
*
*
*
*
*
Sample
*
*
*
*
*
*
Partition
*
*
*
*
*
*
Append
N
Y
N
N
N
N
Merge
N
Y
N
N
N
N
Time Series
N
Y
N
N
N
N
Filter
Y
When the user keeps the created filter variable.
*
N
Y
Y
Y
Explore
Association
N
Y
Y
N
N
N
Cluster
Y
N
Y
Y
Y
Y
DMDB
*
*
*
*
*
*
Graph Explore
*
*
*
*
*
*
Market Basket
N
Y
N
N
N
N
Multiplot
*
*
*
*
*
*
Path
N
Y
Y
N
N
N
SOM
Y
N
N
Y
Y
Y
Stat Explore
*
*
*
*
*
*
Text Miner
N
Y
N
N
N
N
Variable Clustering
Y
N
N
Y
Y
Y
Variable Selection
Y
N
N
Y
Y
Y
Drop
*
*
*
*
*
*
Impute
Y
N
Y
Y
Y
Y
Interactive Binning
Y
N
N
Y
Y
Y
Replacement
Y
N
N
Y
Y
Y
Principle Components
Y
N
N
Y
Y
Y
Rules Builder
Y
N
N
Y
Y
Y
Transform Variables
Y
N
N
Y
Y
Y
Model
Autoneural
Y
N
Y
Y
Y
Y
Decision Tree
Y
N
Y
Y
Y
Y
Dmine Regression
Y
N
Y
Y
Y
Y
Dmine Neural
Y
N
N
Y
Y
Y
Ensemble
Y
N
N
Y
Y
Y
Gradient Boosting
Y
N
N
Y
Y
Y
MBR
N
Y
N
N
N
N
Model Import
*
*
*
*
*
*
Neural Network
Y
N
Y
Y
Y
Y
Partial Least Squares
Y
N
N
Y
Y
Y
Rule Induction
Y
N
N
Y
Y
Y
SVM — Linear Kernel
Y
N
Y
Y
Y
Y
SVM — Nonlinear Kernel
N
Y
N
N
N
N
Two Stage
Y
N
N
Y
Y
Y
Assess
Cutoff
Y
N
N
Y
Y
Y
Decisions
Y
N
N
Y
Y
Y
Model Comparison
Y
N
N
Y
Y
Y
Score
Y
N
N
Y
Y
Y
Segment Profile
*
*
*
*
*
*
Utility
Control Point
*
*
*
*
*
*
Start Groups
Y
N
N
Y
Y
Y
End Groups
Y
N
N
Y
Y
Y
Metadata
*
*
*
*
*
*
Reporter
*
*
*
*
*
*
SAS Code
The user can enter either SAS DATA step code or SAS program code
Y
Y
N
N
N
N
Credit Scoring
Credit Exchange
*
*
*
*
*
*
Interactive Grouping
Y
N
N
Y
Y
Y
Scorecard
Y
N
N
Y
Y
Y
Reject Inference
Y
N
N
Y
Y
Y
* The node does not produce this type of score code.