Forum Stats

  • 3,757,812 Users
  • 2,251,271 Discussions
  • 7,869,922 Comments

Discussions

COMPUTE_ROC

Brendan
Brendan Member Posts: 236 Bronze Badge
edited May 31, 2013 10:25AM in Machine Learning
I'm using the COMPUTE_CONFUSION_MATRIX, COMPUTE_LIFT and COMPUTE_ROC procedures.

I've create a view that applies the model to my testing data set.

This seems to work fine as input to the Confusion Matrixt and Lift procedures. But when I use the view for the COMPUTE_ROC, I get the following error

ORA-40219: apply result table DMUSER.DEMO_CLASS_DT_TEST_RESULTS is incompatible
with current operation
ORA-06512: at "SYS.DBMS_DATA_MINING", line 3224
ORA-06512: at line 4

Those this mean that the apply results need to be in a table for ROC and a view can do for the other two.

Answers

  • Hi Brendan,
    Can you post the code you used to create the roc?
    FYI: Doc for COMPUTE_ROC http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_datmin.htm#autoId35
    I am not aware of any table requirement for COMPUTE_ROC, a view should be fine.
    Is the model a binary classification model (only 2 target values)?
    And what is the data type of the target class column?
    Thanks,Mark
  • Brendan
    Brendan Member Posts: 236 Bronze Badge
    I'm using the sample data.

    DECLARE
    v_area_under_curve NUMBER;
    BEGIN
    DBMS_DATA_MINING.COMPUTE_ROC (
    roc_area_under_curve => v_area_under_curve,
    apply_result_table_name => 'demo_class_dt_test_results', -- this is a view with Case Id, Prediction and Probability
    target_table_name => 'mining_data_test_v',
    case_id_column_name => 'cust_id',
    target_column_name => 'affinity_card',
    roc_table_name => 'DEMO_CLASS_DT_ROC',
    positive_target_value => 1,
    score_column_name => 'PREDICTION',
    score_criterion_column_name => 'PROBABILITY');
    DBMS_OUTPUT.PUT_LINE('**** AREA UNDER ROC CURVE ****: ' ||
    ROUND(v_area_under_curve,4));
    END;
  • Brendan
    Brendan Member Posts: 236 Bronze Badge
    I had the wrong names for the 2 Score column names ;-)
This discussion has been closed.