prediction error using SVM in R
<p>I used SVM function in package "e1071",</p>

<p>The first problem is when i try to predict number of rows less than rows I trained it gives me the following error:</p>

<pre><code>td = wholeData[1:10000,]
model &lt;- svm(Type~.,data = td,type="C-classification")
x =wholeData[1:5000,]
p=predict(model,x)
</code></pre>

<blockquote>
  <p>Error in newdata[, object$scaled, drop = FALSE] : 
         (subscript) logical subscript too long</p>
</blockquote>

<hr>

<p>The second problem is when I try to use huge number of rows it gives the following message:
"Error: cannot allocate vector of size 6.6 Gb"
I do not know to overcome this problem.</p>

<pre><code>td=wholeData[1:100000,]
model1=svm(Type~.,data = td)
</code></pre>

<blockquote>
  <p>Error: cannot allocate vector of size 6.6 Gb
       In addition: Warning messages:
       1: In model.matrix.default(Terms, m) :
         Reached total allocation of 5849Mb: see help(memory.size)
       2: In model.matrix.default(Terms, m) :
         Reached total allocation of 5849Mb: see help(memory.size)
       3: In model.matrix.default(Terms, m) :
         Reached total allocation of 5849Mb: see help(memory.size)
       4: In model.matrix.default(Terms, m) :
         Reached total allocation of 5849Mb: see help(memory.size)</p>
</blockquote>

<p>The structure of data as follow</p>

<pre><code>str(wholeData)
'data.frame':   550116 obs. of  8 variables:
 $ Text   : chr  "IL-2" "gene" "expression" "and" ...
 $ wLength: int  4 4 10 3 8 1 10 7 4 8 ...
 $ Cap    : int  1 0 0 0 1 1 0 0 1 0 ...
 $ Digit  : int  1 0 0 0 0 0 0 0 1 0 ...
 $ POS    : int  11 20 20 9 21 21 20 14 11 40 ...
 $ Type   : Factor w/ 11 levels "1","2","3","4",..: 3 8 11 11 4 9 11 11 4 11 ...
 $ idf    : num  3.2 1.7 1.53 1.01 2.96 2.13 1.73 2.63 4.89 3.94 ...
 $ isword : int  0 1 1 1 0 1 1 1 0 1 ... 
</code></pre>