# Optimized Bandwidth Kernel Density Estimation

I have been trying to use kernel method to estimate pdf of a variable, so I divided the data I have (45,000 points) into training and validation. Training data was used to come up with the pdf and the rest of the data for validation. If I understood correctly, in Parzen window method binwidth is $2h$, so $h$ is the distance from edge of the bin to the center point. So if I find the optimal $h$ value by minimizing MSE, does it mean binwidth, or half of it? I know this seems trivial, but somehow I could not wrap my head around it. And how to optimize $h$ using least-square error method?

## 1 Answer

As you said in your question, $h$ refers to half of the "binwidth". So if you optimize $h$, you find the best half-binwidth $h$.

In terms of optimizing, yhe typical way is to compute the likelihood of your validation set for a given bandwidth, then optimize that likelihood in terms of the bandwidth. If you have more specific questions you could ask a new question.