Displaying 1 result from an estimated 1 matches for "ctgy".
Did you mean:
ctg
2007 Feb 27
0
Optimizing the loop for large data
...for x
CBDy<-D[,7]-4414486.03135 # convert a coordinate for y
AER<-vector("numeric",length(thrs))
OER<-vector("numeric",length(thrs))
MER<-vector("numeric",length(thrs))
# compute the apparent error rates for each threshold value
for (j in 1:length(thrs)){
ctgy<-ifelse(ED>thrs[j],2,1) # 2 categories are created by the threshold
test1<-qda(cbind(ED,CBDx,CBDy),ctgy)
est1<-cbind(ctgy,predict(test1)$class)
AER[j]<-sum((est1[,1]-est1[2])==0)/dim(D)[1]
}
# OER computation for ith location taken out for the thresholds
for (k in 1:dim(D)[1]){
for...