Oracle® Database SQL Reference 10g Release 2 (10.2) Part Number B14200-02 |
|
|
PDF · Mobi · ePub |
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.
For 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.
The mining_attribute_clause
behaves as described for the PREDICTION
function. Please refer to mining_attribute_clause
See Also:
Oracle Data Mining Concepts for detailed information on Oracle Data Mining features
Oracle Data Mining Administrator's Guide for information on the demo programs available in the code
Oracle Data Mining Application Developer's Guide for information on writing Oracle Data Mining applications
CLUSTER_ID and PREDICTION for information on related data mining 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 dm_sh_clus_sample
model and the dm_sh_sample_apply_prepared
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 km_sh_sample_apply_prepared ORDER BY prob DESC) WHERE ROWNUM < 11; CUST_ID PROB ---------- ------ 100052 .9993 100962 .9993 101208 .9993 100281 .9993 100012 .9993 101009 .9992 100173 .9992 101176 .9991 100672 .9991 101420 .9991 10 rows selected.