Displaying 3 results from an estimated 3 matches for "tab4".
Did you mean:
tab
2013 Jan 08
0
bagging SVM Ensemble
...s=F)
prediction3<- predict(modelorad,newdata=testset, decision.values=F)
prediction4<- predict(modelotan,newdata=testset, decision.values=F)
tab1 <- table(pred = prediction1,testset$class)
tab2 <- table(pred = prediction2,testset$class)
tab3 <- table(pred = prediction3,testset$class)
tab4 <- table(pred = prediction4,testset$class)
ecr1<-(tab1[2,1]+tab1[1,2])/sum(tab1)
ecr2<-(tab2[2,1]+tab2[1,2])/sum(tab2)
ecr3<-(tab3[2,1]+tab3[1,2])/sum(tab3)
ecr4<-(tab4[2,1]+tab4[1,2])/sum(tab4)
classAgreement(tab)
#Bagging EnSVM
library(colorspace)
library(rpart)
library(e1071)
l...
2003 Dec 26
3
loop and read.table
Hi,
I would like to open several tables with a loop, using something like :
-----------------
$ ls
1.txt 2.txt 3.txt 4.txt
$ R
> for (i in 1:4) tabi<-read.table("i.txt")
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file `i.txt'
------------------
thanks for any help
Tristan Lefebure
2008 Feb 13
2
apply on large arrays
I have a big contingency table, approximately of size 60*2*500*500,
and I need to count the number of cells containing a count of 1 for each
of the factors values defining the first dimension.
Here is my attempt:
tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM))
tab2<-apply(tab1,1:4,function(x)ifelse(sum(x)==1,1,0))
tab3<-apply(tab2,1,sum)
Computing tab2 is very slow.
Is there a faster