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

<< lastnext >>

Snippet Name: PREDICTION_BOUNDS

Description: PREDICTION_BOUNDS returns an object with two NUMBER fields LOWER and UPPER. For a regression mining function, the bounds apply to value of the prediction. For a classification mining function, the bounds apply to the probability value. If the GLM was built using ridge regression, or if the covariance matrix is found to be singular during the build, then this function returns NULL for both fields.

For confidence_level, specify a number in the range (0,1). If you omit this clause, then the default value is 0.95.

The class_value argument is valid for classification models but not for regression models. By default, the function returns the bounds for the prediction with the highest probability. You can use the class_value argument to filter out the bounds value specific to a target value.

You can specify class_value while leaving confidence_level at its default by specifying NULL for confidence_level.

The following example returns the distribution of customers whose ages are predicted to be between 25 and 45 years with 98% confidence.

This example and the prerequisite data mining operations can be found in the demo file $ORACLE_HOME/rdbms/demo/dmglcdem.sql.

Also see:
» PREDICTION_SET
» PREDICTION_PROBABILITY
» PREDICTION_DETAILS
» PREDICTION_COST
» 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_BOUNDS(<schema.model>, <confidence_level>, <class_value>
USING <* | schema.TABLE.* | expression AS alias>
 
SELECT COUNT(cust_id) cust_count, cust_marital_status
  FROM (SELECT cust_id, cust_marital_status
    FROM mining_data_apply_v
    WHERE PREDICTION_BOUNDS(glmr_sh_regr_sample,0.98 USING *).LOWER > 24 AND
          PREDICTION_BOUNDS(glmr_sh_regr_sample,0.98 USING *).UPPER < 46)
    GROUP BY cust_marital_status;
 
    CUST_COUNT CUST_MARITAL_STATUS
-------------- --------------------
            46 NeverM
             7 Mabsent
             5 Separ.
            35 Divorc.
            72 Married
 


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 73 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?