Java Reference
In-Depth Information
positively to the mail by buying the product, and “0” if the customer
did not respond.
At this point, we begin model building using the responses from
the starter campaign (which serve as the target values) and the corre-
sponding customer demographics and other predictor attributes.
This is done using an SQL join statement, which basically maps the
RESPONSE column to the corresponding customer predictor
attributes using the customer identifier in each table. For example, if
the table containing the original information is CUSTOMERS and the
sample table is STARTER_CUSTOMERS, the SQL statement used to
create the training dataset looks like:
select c.*, sc.RESPONSE
from STARTER_CUSTOMERS sc left outer join
CUSTOMERS c on sc.CUSTOMER_ID c.CUSTOMER_ID
where sc.RESPONSE IS NOT null
For those not familiar with SQL, here is an explanation of the
“left outer join” in this context. The statement will return all the
customers contained in STARTER_CUSTOMERS (which is our sam-
ple list) for which the response has been provided (either 1 or 0)
and join the information known about them contained in the CUS-
TOMERS table. Because the STARTER_CUSTOMERS list has been
obtained from a sample of the CUSTOMERS table, as soon as the
RESPONSE field is valid, this statement will return a table with one
line for each customer in our sample and all the known information
about these customers. This statement is created in the code of the
method buildSQLStatement , shown between lines 2 and 6 in the next
code listing.
Our specification mentioned that the campaign manager would
have to select a number of attributes used to build models. To express
this, we have two options: One is to use the JDM LogicalData feature
that allows users to indicate if attributes are ACTIVE or INACTIVE
via AttributeUsageType . The second is to design SQL select statements
that retrieve only the columns (attributes) explicitly selected. We will
show the use of logical data; however, the implementation of Logical-
Data is optional in JDM and should be checked through the capabili-
ties of the particular data mining engine (DME).
Search WWH ::




Custom Search