Output Created by the Score Code Export Node

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 scoring publishing macro that creates the scoring functions.
Score Code Export Node Output Files
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 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 scoring publishing 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 scoring publishing 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 scoring publishing 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 lookup 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.
Output Variables
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.
Fixed Variable Names
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

Each node in SAS Enterprise Miner creates different types of score code.
These types can include the following:
SAS DATA Step
SAS Program
PMML
C
Java
DBMS
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.
Note: There is limited support for user-written code in the Variable Clustering and Rules Builder nodes. User-written code could produce errors or unexpected results.
For information about the Enterprise Miner nodes and the type of score code that each node produces, see the SAS Enterprise Miner Reference Help and SAS Enterprise Miner High-Performance Data Mining Node Reference for SAS.