Displaying 1 result from an estimated 1 matches for "model_true1".
2010 Nov 23
5
cross validation using e1071:SVM
...ndex[i])
testset<-data[x[[1]],]
trainset<-data[-x[[1]],]
species<-as.factor(trainset[,ncol(trainset)])
train1<-trainset[,-ncol(trainset)]
train1<-train1[,-(1)]
test_t<-testset[,-ncol(testset)]
species_test<-as.factor(testset[,ncol(testset)])
test_t<-test_t[,-(1)]
model_true1 <- svm(train1,species)
pred_true1<-predict(model_true1,test_t)
stat_result<- confusionMatrix(pred_true1,species_test)
stat_true[[i]]<-as.matrix(stat_result,what="overall")
kappa_true[i]<-stat_true[[i]][2,1]
accuracy_true[i]<-stat_true[[i]][1,1]
}
--
View this mess...