|Oracle® Database SQL Language Reference
11g Release 2 (11.2)
Part Number E17118-03
This function is for use with clustering models that have been created with the
DBMS_DATA_MINING package or with the Oracle Data Mining Java API. It returns a measure of the degree of confidence of membership of an input row in a cluster associated with the specified model.
cluster_id, specify the identifier of the cluster in the model. The function returns the probability for the specified cluster. If you omit this clause, then the function returns the probability associated with the best predicted cluster. You can use the form without
cluster_id in conjunction with the
CLUSTER_ID function to obtain the best predicted pair of cluster ID and probability.
mining_attribute_clause behaves as described for the
PREDICTION function. Refer to mining_attribute_clause
Oracle Data Mining Concepts for detailed information about Oracle Data Mining
Oracle Data Mining Administrator's Guide for information on the demo programs available in the code
Oracle Data Mining Application Developer's Guide for detailed information about real-time scoring with the Data Mining SQL functions
The following example determines the ten most representative customers, based on likelihood, in cluster 2.
This example, and the prerequisite data mining operations, including the creation of the
km_sh_clus_sample model and the
mining_data_apply_v view, can be found in the demo file
$ORACLE_HOME/rdbms/demo/dmkmdemo.sql. General information on data mining demo files is available in Oracle Data Mining Administrator's Guide. The example is presented here to illustrate the syntactic use of the function.
SELECT * FROM (SELECT cust_id, CLUSTER_PROBABILITY(km_sh_clus_sample, 2 USING *) prob FROM mining_data_apply_v ORDER BY prob DESC) WHERE ROWNUM < 11; CUST_ID PROB ---------- ---------- 100256 .999387471 100988 .99936194 100889 .999335107 101086 .99928882 101215 .999266521 100390 .999264718 100985 .999251722 101026 .999247906 100601 .999242089 100672 .999235711 10 rows selected.