Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/denpro.R View source: R/leafsfirst.adagrid.R
Computes a level set tree of a discretized kernel estimator with an adaptive grid .
1 | leafsfirst.adagrid(pcf)
|
pcf |
piecewise constant function; output of "pcf.greedy.kernel" |
a level set tree
Function pcf.greedy.kernel is in package "delt"
Jussi Klemela
http://jussiklemela.com/Art/volume
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # generate data
seed<-1
n<-50
d<-2
l<-3; D<-4; c<-D/sqrt(2)
M<-matrix(0,l,d); M[2,]<-c; M[3,]<--c
sig<-matrix(1,l,d)
p<-rep(1/l,l)
dendat<-sim.data(type="mixt",n=n,M=M,sig=sig,p=p,seed=seed)
h<-(4/(d+2))^(1/(d+4))*n^(-1/(d+4))*apply(dendat,2,sd)
minobs<-3
#pcf<-pcf.greedy.kernel(dendat,h,minobs=minobs,type="greedy")
#lst<-leafsfirst.adagrid(pcf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.