Data Mining User's Guide
ContentsOpens a new window
Opens a new window
Page 101 of 152

Single-Record Scoring

The data mining functions can produce a score for a single record, as shown in Example 6-4Opens a new window and Example 6-5Opens a new window.

Example 6-4Opens a new window returns a prediction for customer 102001 by applying the classification model NB_SH_Clas_sample. The resulting score is 0, meaning that this customer is unlikely to use an affinity card.

Example 6-5Opens a new window returns a prediction for 'Affinity card is great' as the comments attribute by applying the text mining model T_SVM_Clas_sample .The resulting score is 1, meaning that this customer is likely to use an affinity card.

Example 6-4 Scoring a Single Customer or a Single Text Expression

SELECT PREDICTION (NB_SH_Clas_Sample USING *)
    FROM sh.customers where cust_id = 102001;  
 
PREDICTION(NB_SH_CLAS_SAMPLEUSING*)
-----------------------------------
                                  0

Example 6-5 Scoring a Single Text Expression

SELECT
  PREDICTION(T_SVM_Clas_sample USING 'Affinity card is great' AS comments)
FROM DUAL;
 
PREDICTION(T_SVM_CLAS_SAMPLEUSING'AFFINITYCARDISGREAT'ASCOMMENTS)
-----------------------------------------------------------------
                                                                1
Previous PageOpens a new window
Page 101 of 152
Next PageOpens a new window