title: Tuning one-class SVM classification R using e1071 ERROR
body: <p>I am relatively new to SVM in R. I have created an SVM model that works fine with default settings but when I try to use the tune.svm() function to refine the parameters with the same data it throws the following error:</p>
  
  <p>"Error in if (tunecontrol$cross > n) stop(sQuote("cross"), " must not exceed sampling size!") : argument is of length zero"</p>
  
  <p>Any help would be greatly appreciated</p>
  
  <p>The trainingDataFrameNoLabels is a 107*5 dataframe here is the snippets of code I am using.  </p>
  
  <p>`</p>
  
  <pre><code>install.packages("e1071")
  install.packages("raster")
  install.packages("Rcpp")
  install.packages("rgdal")
  library("e1071")
  library("raster")
  require(raster)
  trainingData=read.csv(file="Z:/BIO650/Buttomus_Species_Distribution_Model/Working_Data/Training_And_Validation/Training_With_Data.csv",header = TRUE, sep=",")
  trainingDataFrame=data.frame(trainingData)
  trainingDataFrameNoLabels=trainingDataFrame[,2:6]
  svmModel=svm(trainingDataFrameNoLabels,y=NULL, method = "one-classification")
  tobj = tune.svm(x=trainingDataFrameNoLabels[1:50,],y=NULL, method = "one-classification",gamma = 10^(-6:-3), nu =  0.001:0.5)
  </code></pre>
  
  <p>`</p>