Skip to Main Content

Data Science & Machine Learning

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

COMPUTE_ROC

Brendan TMay 31 2013 — edited May 31 2013
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.

Comments

SH_INT

What error are you getting? Are you sure the string you are trying to convert only contains numeric characters? The method you are trying will work so long as the string is just a representation of a number

JanGLi

The value is 100 percent integer (2017). I have confirmed it by logging.

I even tried using this x = int('19') but getting an error.


Unfortunately i don't have python compiler at the moment. Getting just script fail error in log.

These are the classes i have added:

import string

import java.sql as sql

import java.lang as lang

Regards

JohnGoodwin
Answer

This works for me, no need to import java classes

fdmAPI.logDebug("Period Name=:%s" % fdmContext["PERIODNAME"])

fullYear = int("20" + fdmContext["PERIODNAME"][4:])

fdmAPI.logDebug("Full Year Name=:%s" % fullYear)

pastedImage_2.png

or

YearMinus1 = int("20" + fdmContext["PERIODNAME"][4:])-1

fdmAPI.logDebug("Year -1=:%s" % YearMinus1)

pastedImage_3.png

Cheers

John

Marked as Answer by JanGLi · Sep 27 2020
JanGLi

Thanks for help.

Regards

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 28 2013
Added on May 31 2013
3 comments
1,907 views