# NOT RUN {
# old faithful data
x=datasets::faithful
x=cbind(x[,1],x[,2])
fit=rlcv_d(x.obs=x)
# evaluation data
x1=seq(min(x[,1])*.8,max(x[,1])*1.2,length=30)
x2=seq(min(x[,2])*.8,max(x[,2])*1.2,length=30)
x11=rep(x1,each=30)
x22=rep(x2,30)
fhat=kde_d(x.new=cbind(x11,x22),x.obs=x,h=fit$h)
persp(x1,x2,matrix(fhat,30,30))
# }
Run the code above in your browser using DataLab