R/nn.likeset.R

Defines functions nn.likeset

nn.likeset<-function(dendat,radmat,k,p=0.1,lambda=NULL)
{
n<-dim(dendat)[1]
d<-dim(dendat)[2]

volunitball<-volball(1,d)

radit<-radmat[,k]
evat<-k/(n*radit^d*volunitball)
if (is.null(lambda)){
  maksi<-max(evat,na.rm=TRUE)
  lambda<-p*maksi
}
grt<-(evat>=lambda)

#dendatsub<-dendat[grt,]

return(grt)
}

Try the denpro package in your browser

Any scripts or data that you put into this service are public.

denpro documentation built on May 2, 2019, 8:55 a.m.