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
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,858 views