The following table lists each function together with a brief summary of how it is used.
| Application function | Purpose |
|---|---|
| DM_applyClusModel | Applies a model to selected data to produce
results data, grouped into clusters. Clusters are identified when
the model is built. They identify similar characteristics in data.
You can use this function in producing targeted mailshot letters. |
| DM_applyClasModel | Applies a model to selected data to produce
results data that is classified according to rules established when
the model is built. You can use this function in classifying insurance risks. |
| DM_applyRegModel | Applies
a model to selected data to calculate
a predicted value. The predicted value is based on the values of
input fields, according to a pattern established when the model is
built. You can use this function in ranking customers. |
Example:
<row><column name="DEPTNO">D01</column>
<column name="MGRNO" null= "true"/>
<column name="ADMRDEPT">A00</column></row>
There are several ways of how to construct this XML string. The most convenient and best performing way is to use the DB2® REC2XML function. For the apply functions that expect an object of type DM_ApplicationData, you must use the DM_impApplData function to convert the REC2XML output of type VARCHAR into type DM_ApplicationData.
Example:
IDMMX.DM_impApplData( REC2XML( ... ) )
For more information refer to Customizing the results data.
Where XXX can be CLAS, CLUS, or REG.
Example:
IDMMX.DM_applyClusModel( 'DemoBanking', rec2xml( 1.0, 'COLATTVAL', '',
"AGE","GENDER","MARITAL_STATUS" ) )
Where XXX can be CLAS, CLUS, or REG.
Example:
SELECT IDMMX.DM_applyClusModel( C."MODEL" ,
IDMMX.DM_impApplData(rec2xml( 1.0, 'COLATTVAL', '',
B."AGE",B."GENDER",B."MARITAL_STATUS") ) )
FROM "BANKING_SCORING" B, IDMMX."CLUSTERMODELS"
C WHERE C."MODELNAME"='DemoBanking'
DM_applyXXXModel ( model, application data, resultspec )
Where XXX can
be CLAS or CLUS .SELECT IDMMX.DM_applyClusModel( C."MODEL" ,
IDMMX.DM_impApplData(
rec2xml( 1.0, 'COLATTVAL', '',
B."AGE",B."GENDER",B."MARITAL_STATUS") ) ,
IDMMX.DM_ClusResultSpec()..DM_setCluster(3) )
FROM "BANKING_SCORING" B, IDMMX."CLUSTERMODELS" C
WHERE C."MODELNAME"='DemoBanking'
The function returns results data that contains the values that are calculated by the mining logic.