Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: PREDICTION_PROBABILITY Jump to:  
Category: >> Oracle PL/SQL >> PREDICTION_PROBABILITY Bookmark and Share

<< lastnext >>

Snippet Name: PREDICTION_PROBABILITY

Description: PREDICTION_PROBABILITY is for use with classification models created by the DBMS_DATA_MINING package or with the Oracle Data Mining Java API. It is not valid with other types of models. It returns the probability for a given prediction as an Oracle NUMBER.

If you specify the optional class parameter, then the function returns the probability for the specified class. This is equivalent to the probability associated with choosing the given target class value.

If you omit the class parameter, then the function returns the probability associated with the best prediction. You can use this form in conjunction with the PREDICTION function to obtain the best pair of prediction value and probability.

The following example returns the 10 customers living in Italy who are most likely to use an affinity card.

This example can be found in the demo files $ORACLE_HOME/rdbms/demo/dmdtdemo.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.

Also see:
» PREDICTION_SET
» PREDICTION_DETAILS
» PREDICTION_COST
» PREDICTION_BOUNDS
» PREDICTION
» FEATURE_SET
» FEATURE_ID
» CLUSTER_SET
» CLUSTER_PROBABILITY
» CLUSTER_ID

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 07th, 2009

PREDICTION_PROBABILITY(<schema.model>  <class>
<mining_attribute_clause>)
 
SELECT cust_id FROM (
   SELECT cust_id
   FROM mining_data_apply_v
   WHERE country_name = 'Italy'
   ORDER BY PREDICTION_PROBABILITY(DT_SH_Clas_sample, 1 USING *)
      DESC, cust_id)
   WHERE ROWNUM < 11;
 
   CUST_ID
----------
    100081
    100179
    100185
    100324
    100344
    100554
    100662
    100733
    101250
    101306
 
10 rows selected.
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 156 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?