Reputation: 1
set.seed(1234)
ind<- sample(2,nrow(data),replace = T,prob = c(0.7,0.3))
training<- data[ind==1,1]
test<- data[ind==2,1]
trainingtarget<-data[ind==1,2:4]
testtarget<- data[ind==2,2:4]
trainLabels<- to_categorical(trainingtarget)
testLabels<- to_categorical(testtarget)
print(testLabels)
when i run this code this error comes Error in py_call_impl(callable, dots$args, dots$keywords) : MemoryError: Unable to allocate 5.88 TiB for an array with shape (275703, 5863139) and data type float32
Detailed traceback: File "C:\Users\Dell\AppData\Local\R-MINI~1\envs\R-RETI~1\lib\site-packages\tensorflow\python\keras\utils\np_utils.py", line 74, in to_categorical categorical = np.zeros((n, num_classes), dtype=dtype)
Upvotes: 0
Views: 454