Kernels can also be used as density estimators. Specifically, we have fh(x) = 1 n X i Kh(x − xi). (4.70) In this setting we see again why it is important to have the integral of the kernel equal to 1. Write a function kern_density that accepts a training vector x, bandwidth h, and test set x_new, returning the kernel density estimate from the Epanechnikov kernel. Visually test how this performs for some hand-constructed datasets and bandwidths.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here