search for: hogtrain

Displaying 1 result from an estimated 1 matches for "hogtrain".

Did you mean: contrain
2009 Nov 17
2
SVM Param Tuning with using SNOW package
...lease, can anyone help me! :-(( Here is the code: data <- data.frame(Y=I(Y),X=I(X)) data.X<-data$X data.Y<-data$Y NR=10 cost1=seq(0.5,30, length=NR) sv.lin<- function(cl,c) { for (i in 1:NR) { ind=sample(1:414,276) hogTest<- data.frame(Y=I(data.Y[-ind]),X=I(data.X[-ind,])) hogTrain<- data.frame(Y=I(data.Y[ind]),X=I(data.X[ind,])) svm.lin <- svm(hogTrain$X,hogTrain$Y, kernel="linear",cost=c[i], cross=5) results.lin <- predict(svm.lin, hogTest$X) e.test.lin <- sqrt(sum((results.lin-hogTest$Y)^2)/length(hogTest$Y)) return(e.test.lin) } } cl&...