How to estimate the Gaussain kernel based on spatial bandwidth for KDE
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to use bandwidth h= 10 to estimate Gaussian Kernel
Not sure how to use it for each point
please advice
1 个评论
Image Analyst
2014-11-21
What does "bandwidth" mean in this context? It usually refers to the width of a range of frequencies in a spectral (Fourier) domain. Do you mean the spatial width of the Gaussian in the spatial domain?
回答(3 个)
the cyclist
2014-11-21
If you have the Statistics Toolbox, you can use the ksdensity function for this, and set the bandwidth as a parameter.
the cyclist
2014-11-21
Even if this function does not help you directly, it may give you some hints at how to code what you need yourself.
5 个评论
the cyclist
2014-11-21
编辑:the cyclist
2014-11-21
@tania:
The kde function I mentioned in this answer is not the ksdensity function supplied by MATLAB itself. It is a user-contributed function at the File Exchange that seems to do much of what you want to do.
I am going to say something that might sound a bit harsh. Sorry.
It seems that you don't know a lot about kernel density estimation, and you also don't know a lot about MATLAB. I am not confident we can really teach you both of these things in this forum.
The kde file is very well documented code that does much of what you need. If at all possible, you need to study that, and maybe you need to find someone locally who understands MATLAB really well, or kernel density estimation really well, to help you understand what that code is doing.
Image Analyst
2014-11-21
Lacking a clear definition of bandwidth, I'm going to hurl out a SWAG: how about if you use the fspecial() function to create a Gaussian? It will create a small array where the window width in elements, and the standard deviations (width within the window) is what you specify.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!