title: R SVM Prediction
body: <p>I'm new in R, so help me please to understand what is wrong.
  I'm trying to predict some data, but object that predict function returns (it is strange class (factor)) contains low data. Test set size is 5886 obs. of 160 variables, when predict object lenght is 110... I expected vector of predicted classes or data frame back. What do I understand wrong?</p>
  
  <pre><code>library(MASS)
  library(e1071)
  set.seed(333)
  
  data &lt;- read.csv(file="D:\\MaсhLearningAssign\\pml-training.csv", head=TRUE, sep=",")
  
  index &lt;- 1:nrow(data)
  testindex &lt;- sample(index, trunc(length(index)*30/100))
  train &lt;- data[-testindex, ]
  test &lt;- data[testindex, ]
  
  model  &lt;- svm(classe~., data = train, kernel="radial", gamma=0.001, cost=10)
  prediction &lt;- predict(model, test)
  summary(prediction)
  
  
  
  Output:
      A  B  C  D  E 
      28 24 25 12 22 
  </code></pre>
  
  <p><a href="https://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv" rel="nofollow">Dataset here</a></p>