# 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?

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$.