Professional Documents
Culture Documents
Clementine ®
Solution
Publisher
®
Clementine® Solution Publisher
Figure 1: A Clementine stream is a collection of icons or nodes that represents a data mining solution. This
example shows two circular data access nodes on the left. The data contained in these nodes flow into processing
steps, including data source merging. The data is then fed into models that write scores to the data before
passing data to other processing steps. The last node is the Clementine Solution Publisher node, which exports
all of this functionality as a standalone program. Most approaches deploy just a model. With Clementine
Solution Publisher, all of the steps are deployed.
Technical report 2
Clementine® Solution Publisher
Technical report 3
Clementine® Solution Publisher
Technical report 4
Clementine® Solution Publisher
The executable program interprets the command-line options, loads the image file, reads the
parameter file settings and executes the published stream. Any errors or log messages are
written to the standard error output.
On Unix, the clemrun program is a shell script, which runs a binary executable within an
appropriate environment. The executable is called:
clemrun_exe
Supported and
unsupported features
Clementine Solution Publisher
supports most of the features of
Clementine streams. Some excep-
tions include CEMI models and
terminal nodes, such as model-
building nodes, visualization nodes
and output nodes. Note however
that some output functions, like
scoring a database, are handled Figure 4: This dialogue box will be displayed when the "flat file"
by the Publisher node itself. option is selected in the Publisher node. The dialogue enables
users to specify how data will be written when the published
stream is executed outside the Clementine user interface.
Technical report 5
Clementine® Solution Publisher
Deployment doesn’t end once information has reached its destination — the feedback loop
must come full circle so models are improved. Model builders need feedback from data mining
projects to update and improve models as changes — such as customer behavior or your
organization’s capabilities — occur.
Whether it’s reducing fraud, retaining profitable customers, targeting better prospects or
managing risk, using Clementine Solution Publisher when data mining ensures you’ll get
the right information in the hands of the right people and systems.
Technical report 6
Clementine® Solution Publisher
Messages
Reports contain useful information that should be communicated back to the application in
some way. The CLEMRTL provides a number of mechanisms for dealing with such reports:
1. Set a log file
2. Get details of the last error
3. Set a report handler
The runtime system has a localized message catalogue for reports; any report passed to the
application would include the localized message string but also the report code so that the
application could choose to interpret and present the message differently. In order to get
detailed (localized) messages, the application needs to store the appropriate messages.cfg
file in a config directory.
Environment
The runtime system needs no special environment or registry settings to operate correctly.
Dependent libraries must be distributed with an application linked to the CLEMRTL. These
files are included on the Clementine Solution Publisher Runtime CD-ROM in the REDISTRIB
directory.
Technical report 7
Clementine® Solution Publisher
API procedures
Some general points:
■ Clemrtl_initialize must be called before any other functions in the library are used
■ An application might want to initialize the random number generator (RNG) to specify
some explicit value. Or, an application might want to initialize the RNG to some explicit
value to ensure a consistent sequence of random numbers for its own use. It is necessary to
initialize the runtime library before the RNG. An application should also be aware that call-
ing any runtime library function is likely to generate one or more random numbers, which will
disrupt the sequence.
■ The API has C-linkage for maximum compatibility, but the libraries will still have C++
dependencies, which on some platforms might mean they can only be used with a C++
aware linker
■ The runtime system is not itself multi-threaded, i.e., all API calls — except Interrupt —
must be made from the same thread, but is safe for use in a multi-threaded environment
■ Every function returns a status indicator. The status indicator values are:
– CLEMRTL_OK - Success
– CLEMRTL_FAIL - Failed — no further details available
– CLEMRTL_ERROR - Failed — additional information about the error — the
server report code, severity and message text — will be
available through the Get Error Detail call
■ Multiple images can be opened simultaneously, and each image can be executed multiple
times. However, only one image can be executed at a time because of single threading.
Initialize
int clemrtl_initialize();
Description
Initializes the Publisher runtime library.
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_FAIL Function failed
Technical report 8
Clementine® Solution Publisher
Get option
Description
Retrieves the value of a global option.
Parameter Description
optionName String containing the option name
optionValue String to receive the option value
bufflen The length of the buffer passed to receive the option value
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Set option
Description
Updates the value of a global option.
Parameter Description
optionName String containing the option name
optionValue String containing the option value
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Description
Redirects log messages from all subsequently opened images.
Parameter Description
LogType Type of log, must be one of the following values:
CLEMRTL_STDERROR_LOG — send messages to stderr
CLEMRTL_NULL_LOG — suppress messages
CLEMRTL_FILE_LOG — send messages to specified file
file String containing the file name
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_FAIL Function failed
Technical report 9
Clementine® Solution Publisher
Open image
int clemrtl_openImage
(const char* paramFile, const char* imageFile, unsigned int*handle);
Description
Load a published image.
Parameter Description
paramFile String containing the parameter filename
imageFile String containing the imagefilename
handle The handle to the image
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Close image
Description
Close an image handle and free its resources.
Parameter Description
handle The handle to the image
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_FAIL Function failed
Enumerate parameters
int clemrtl_enumerateParameters
(unsigned int handle, void (*callback_ proc)(const char *,const char *) );
Description
Applies the call-back procedure to each image parameter (name and value).
Parameter Description
handle The handle to the image
void (*callback_proc) Enumeration call-back procedure
(const char *,const char *)
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Technical report 10
Clementine® Solution Publisher
Get parameter
int clemrtl_getParameter
(unsigned int handle, const char *ParamName, char *ParamValue, int bufflen);
Description
Retrieves the value of an image parameter.
Parameter Description
handle The handle to the image
paramName String containing the parameter name
paramValue String to receive the parameter value
bufflen The length of the buffer receiving the parameter value
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Set parameter
int clemrtl_setParameter
(unsigned int handle, const char *ParamName, const char *ParamValue);
Description
Updates the value of an image parameter.
Parameter Description
handle The handle to the image
paramName String containing the parameter name
paramValue String containing the parameter value
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Technical report 11
Clementine® Solution Publisher
int clemrtl_setReportHandler
(unsigned int handle, void (*handler)(char, int, const char *) );
Description
Installs a report handler for an image. The call-back procedure is called for each information-
al or diagnostic report and receives the report code, the severity indicator and a text mes-
sage.
Parameter Description
handle The handle to the image
void (*handler) Enumeration call-back procedure
(char, int, const char *)
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
Execute image
Description
Executes an image using the current parameter settings.
Parameter Description
handle The handle to the image
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_ERROR An error occurred and more details are available
int clemrtl_getErrorDetail
(unsigned int handle, int *code, char *severity, char *text, int bufflen);
Description
Retrieves detailed information about the last error.
Parameter Description
Handle The handle to the image or 0 (e.g., Error on Open Image)
Code Error code number
Technical report 12
Clementine® Solution Publisher
Severity indicator :
I Information Message
W Warning
E Error Message
X System Error
Text Error message Text string
bufflen Length of the error message text string
Returns
One of the following codes:
Error code Description
CLEMRTL_OK No error
CLEMRTL_FAIL Function failed
CLEMRTL_ERROR An error occurred and more details are available
Interrupt
void clemrtl_interrupt();
Description
Terminates any outstanding image execution. This function alone is safe to be called from a
signal handler or a separate thread. It sets a flag in the library, which causes any active call
to the execute function to terminate prematurely with a status value indicating that the call
was interrupted.
Returns
This function does not have a return code.
resetInterrupt
void clemrtl_resetInterrupt();
Description
Resets the interrupt signal.
Returns
This function does not have a return code.
About SPSS
SPSS helps people solve business problems using statistics and data mining. This predictive
technology enables our customers in the commercial, higher education and public sectors to
make better decisions and improve results. SPSS software and services are used successfully
in a wide range of applications, including customer attraction and retention, cross-selling,
survey research, fraud detection, enrollment management, Web site performance, forecasting
and scientific research. SPSS' market-leading products and product lines include SPSS,®
Clementine,® AnswerTree,® DecisionTime,® SigmaPlot® and LexiQuest.™ For more information,
visit our Web site at www.spss.com.
SPSS is a registered trademark and the other SPSS products named are trademarks of SPSS Inc.
All other names are trademarks of their respective owners. © Copyright 2002 SPSS Inc. All rights reserved.