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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Embedded R Script error: cannot allocate vector of size 838.6 Mb

Namrata BhattacharjeeAug 14 2013 — edited Aug 21 2013

Hi,

I am trying to use linear model in Embedded R Scripts. In the Linear Model, we have to predict on a column which is dependent on 7 selected variables. The table has around 115335 records. I get an error when i fire the below select query saying 'RQuery Error: cannot allocate vector of size 838.6 Mb'.

Is there any limit on the number of records to be passed for prediction?

My script looks like below:

begin

sys.rqScriptDrop('OOS_LD_Prediction');

sys.rqScriptCreate('OOS_LD_Prediction',

'function(dat,datastore_name) {

mod <- lm(OOS_LOST_DOLLARS ~ DAY_OF_WEEK + STORE + PEP_BRAND + ITM_VELOCITY_CLUSTER + STR_VELOCITY_CLUSTER + OOS_REASON + DAYS_OF_SUPPLY, dat)

prd <- predict(mod, newdata=dat)

prd[as.integer(rownames(prd))] <- prd

res <- cbind(dat, PRED = prd)

}');

end;

/

select *

from table(rqTableEval(

cursor(select day_of_week, store, pep_brand, itm_velocity_cluster, str_velocity_cluster, oos_reason, days_of_supply, oos_lost_dollars

from oos_aggr_fact),

cursor(select 1 as "ore.connect", 'LP' as "datastore_name" from dual),

'select day_of_week, store, pep_brand, itm_velocity_cluster, str_velocity_cluster, oos_reason,days_of_supply, oos_lost_dollars, 1 PRED

from oos_aggr_fact',

'OOS_LD_Prediction' ));

Error generated:

ORA-20000:RQuery error

Error: cannot allocate vector of size 838.6 Mb

ORA-06512: at "RQSYS.RQTABLEEVALIMPL", line 112

ORA-06512: at "RQSYS.RQTABLEEVALIMPL", line 109

20000.00000 - "%s"

Can someone please help me with this?

This post has been answered by Mark Hornick-Oracle on Aug 15 2013
Jump to Answer

Comments

darrylburke
Moderator action: Moved from Java Programming.

db
darrylburke
You add the <tt>KeyListener</tt> to the <tt>Applet</tt>, so why do you expect to get <tt>KeyEvent</tt>s in the <tt>Canvas</tt>?

Do you have a reason for using an <tt>Applet</tt> (AWT) and not a <tt>JApplet</tt> (Swing)? With a Swing <tt>JApplet</tt> and a <tt>JPanel</tt>, you get double buffering for free and you can use Key Bindings.

db
801176
Uhh thanks!

I want they Key event s in the Applet. But I don't get them.:S

EDIT:

I found the solution, if someone have the same problem:
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {

            public boolean dispatchKeyEvent(KeyEvent e) { // This example converts all typed keys to upper case
                if (e.getID() == KeyEvent.KEY_TYPED) {
                    e.setKeyChar(Character.toUpperCase(e.getKeyChar()));
                } // If the key should not be dispatched to the
                // focused component, set discardEvent to true
                System.out.println(e.getKeyChar());
                boolean discardEvent = false;
                return discardEvent;
            }
        });
Edited by: Teh Heavenly on 2010.10.05. 12:43
801176
Took me 3 hours googling, but finally...
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 18 2013
Added on Aug 14 2013
12 comments
5,907 views