Matlab 中的二维核密度估计 [英] 2D Kernel Density Estimate in Matlab

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

问题描述

我正在使用

我想更改 KDE 函数参数,以便在更大的区域(例如,红色圆圈区域)计算密度.我需要更改哪些参数?我认为这是其中之一(或两者):

n:计算密度的 n x n 网格的大小(默认 2^8)"

或:

MIN_XY, MAX_XY:计算密度的边界框的限制".默认限制计算如下:

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

非常感谢.

解决方案

我已经用这个函数运行了一些测试,解决方案是使用较低的 n 值.这是使用相同数据集的一系列比较图.n 的值显示在标题中(所有其他参数保持不变):

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

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.

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: size of the n by n grid over which the density is computed (default 2^8)"

OR:

"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;

Thanks very much.

解决方案

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 中的二维核密度估计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆