sgk: Single Gaussian Kernel

Description Usage Arguments Details Value Examples

Description

sgk evaluates a kernel with a given center and bandwidth.

Usage

1
sgk(t, e, h, p = 1)

Arguments

t

a number or vector corresponding to the training data point.

e

a vector, or array corresponding to the evaluation data points.

h

the width of the kernel.

p

the dimensionality of the space. Default is univariate (p=1).

Details

These are the details of the function.

Value

y_pdf The evaluation at location e of the Gaussian kernel centered at t and with width h.

Examples

1
2
3
4
5
6
singleKde1D <- sgk(0,seq(from=-5,to=5,by=0.1),1)
plot(singleKde1D$x_pdf,singleKde1D$y_pdf,
   type='l',
   xlab = 'x',ylab='kernel density estimate')
   axis(1,singleKde$t,labels = NA,lwd.ticks = 2,col.ticks = 'red',tck=0.1)
singleKde2D <- sgk(t=c(0,1),e=array(1:10,dim=c(2,5)),h=1)

kcucchi/vdke documentation built on May 20, 2019, 8:28 a.m.