Displaying 1 result from an estimated 1 matches for "dataclstrain".
2010 May 14
0
bootstrapping an svm
...line which I determined with print statements. How do I tune an svm in a bootstrap? I can't find sample code anywhere.
Code:
library(e1071)
library(boot)
source("hw2a.r")
D <- read.csv("colonoscopy.csv", header=T)
E <- read.csv("CLStest.csv", header=T)
dataclstraining <- subset(D,select=c(....))
classesclstraining <- subset(D, select=Class)
dataclstest <- subset(E,select=c(.......))
classesclstest <- subset(E, select=Class)
bootsvm <- function(data, new_data, newdata_classes, indices)
{
d <-data[indices,]
** model2 <- best.svm(Class~.,d...