# Kernel density estimation with FFT for a univariate non-parametric regression

The non-parametric regression model to be estimated looks like the following

x_t = b(x_t-1) + epsilon_t


Forfinding the optimal bandwith h in the kernel regression a cross-validation method (leave a point out and estimate it with the rest of the sample) is used and evaluated via the expected prediction error (EPE). This takes a while since the kernel has to be calculated each time for a range of potential h-values and every sample without x_i.

Therefore the use of FFT (Paper: link and similar post: link) can speed up the calculations. In my understanding the following is the way to go:

1. Discretize the data (x_t-1 values) by using linear binning
2. Take the Fourier-transform of the binned data
3. Multiply the transformed binned data with the Fourier-Transform of the Gaussian-kernel
4. Inverse-transform the product back to get the kernel estimation

But I fail to understand how implement this since once the data is binned (I assume here x_t-1) the connenction to the y-values of the kernel regression (here x_t) is broken?

Basically, when you "bin" your data, you are chopping the x range up into intervals, $$[t_k; t_{k+1}]$$. For each such interval, you construct one new y value which averages among the observations that fall in the bin. But there's a particular weighting scheme which needs to be followed, including the distance of the bins, which I believe has to be uniform (so that $$t_{k+1} - t_k = \delta$$ for all $$k$$). So I encourage you to check out the paper.