本文介绍了在Matlab二维核密度估计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的这个函数估计二维核密度。我稍微用这个函数但是参数相混淆。

I am using this function to estimate kernel density in 2D. I am slightly confused by the parameters of this function however.

下面是一个例子,从正上方,其中密度正在计算在每个点(O)在图中被观看。即:在非常小的区域

Here is an example, viewed from directly above, where density is being calculated at each point (O) in the figure. i.e: over very small areas.

我想改变KDE功能参数,使得密度计算在较大的区域(例如,区域红圈)。哪些参数,我需要改变吗?我presume这是一个(或两个):

I want to change the KDE function parameters so that density is computed over a larger area (for example, the area circled in red). Which parameters do I need to change? I presume it is one (or both) of these:

N:在其密度计算的由N格(缺省为2 ^ 8)的尺寸

"n: size of the n by n grid over which the density is computed (default 2^8)"

MIN_XY,MAX_XY:边界框在其上密度计算的限制。默认限额计算如下:

"MIN_XY, MAX_XY: limits of the bounding box over which the density is computed". The default limits are computed as:

MAX = max(data,[],1); 
MIN = min(data,[],1); 
Range = MAX-MIN; 
MAX_XY = MAX+Range/4; 
MIN_XY = MIN-Range/4;

非常感谢。

推荐答案

我已经运行了该功能的一些测试,解决的办法是使用 n值。这里是一系列的比较图中,使用相同的数据集。 n的值被显示在标题(所有其它参数保持不变):

I have run some tests with this function and the solution is to use lower values of n. Here is a series of comparison figures, using the same dataset. The value of n is shown in the title (all other parameters are kept constant):

这篇关于在Matlab二维核密度估计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 04:11