Answered step by step
Verified Expert Solution
Question
1 Approved Answer
As mentioned in class, the kernel density estimate is just the sum of a bunch of copies of the kernel, each centered on our data
As mentioned in class, the kernel density estimate is just the sum of a bunch of copies of the kernel, each centered on our data points. For those of you familiar with the idea of "convolution", the KDE is simply the convolution of the kernel with the data. The default kernel used by the distplot function is the Guassian kernel, given by: exp(-Gr-z)2 22 22 In Python code, this function is given as below, where alpha is the parameter , z is the x coordinate of the center of the Gaussian (i.e. a data point), and x is the independent variable. The function header is given below. Complete the function body using the formula above. You might find function such as np.exp can be helpful # BEGIN SOLUTION def gaussian_kernel (alpha, x, z): ## END SOLUTION
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started