Error: cannot allocate vector of size 76.4 Gb

library(e1071)

Attaching package: ‘e1071’

The following object is masked from ‘package:mlr’:

impute

Warning message:
package ‘e1071’ was built under R version 3.4.4

svm_model <- svm(Price ~ ., data=data.over.svm)
Error: cannot allocate vector of size 76.4 Gb
memory.limit()
[1] 8071
memory.limit(size=56000)
[1] 56000
svm_model <- svm(Price ~ ., data=data.over.svm)
Error: cannot allocate vector of size 76.4 Gb
how to solve this vector allocation error?

You are not going to get more RAM by running a command in R. R works with data in-memory (i.e., in RAM). There are packages that allow you to use hard disk for some of the operations, but in this case I'm not sure if that is possible.
So your solution is to decrease number of observations in your data so that you can fit it into memory.

5 Likes

i have already decreased the number of observation. the total number of records were 40596053 and i decrased it to 102269 number of records.

Your dataset does not fit in your ram - This unfortunately is not trivial to solve.

If you have access to a bigger computer, this is an option. You can also use e.g. google cloud services to obtain a computer with more ram. You can decrease the size of the data set or you can transfer your data set to a SQL database and then access the data using queries.

2 Likes