User Guide
174
Chapter 7
Scoring Data
with Predictive Models
The process
of applying a predictive model to a set of data is referred to as scoring
the data. SPSS, Clementine, and AnswerTree have procedures for building predictive
models such as regression, clustering, tree, and neural network models. Once a model
has been bui
lt, the model specifications can be saved as an XML file containing all of
the information necessary to reconstruct the model. The SPSS Server product then
provides the means to read an XML model file and apply the model to a data file.
Example. A credit application is rated for risk based on various aspects of the applicant
and the loa
n in question. The credit score obtained from the risk model is used
to accept or reject the loan application.
Scoring is treated as a transformation of the data. The model is expressed internally
as a set of
numeric transformations to be applied to a given set of variables—the
predictor variables specified in the model—in order to obtain a predicted result. In
this sense, the process of scoring data with a given model is inherently the same as
applying
any function, such as a square root function, to a set of data.
Scoring is available only with SPSS Server and is a task that requires the use of
SPSS command syntax. The necessary commands can be entered into a syntax editor
window a
nd run interactively by users working in distributed analysis mode. The set
of commands can also be saved in a command syntax file and submitted to the SPSS
Batch Facility, a separate executable version of SPSS provided with SPSS Server. For
large da
ta files you’ll probably want to make use of the SPSS Batch Facility. For
information about using the SPSS Batch Facility, see the SPSS Batch Facility User’s
Guide, provided as a PDF file on the SPSS Server product CD.
The syntax required for scoring includes the
MODEL HANDLE command, and either
the App
lyModel
or StrApplyModel function.
The MO
DEL HANDLE
command is used to read the XML file containing the model
specifications. It caches the model specifications and associates a unique name
with the cached model. For details, see the SPSS Command Syntax Reference.
The ApplyModel or StrApplyModel function is used with the COMPUTE
comma
nd to apply the model. For details, see Scoring Expressions in the
Transformation Expressions section of the SPSS Command Syntax Reference.










