【发布时间】:2015-06-30 04:49:52
【问题描述】:
我正在使用 Matlab 和提供的代码 http://www.mathworks.com/matlabcentral/fileexchange/14034-kernel-density-estimator/content/kde.m
对一维数据进行聚类。特别是我估计了我的数据的密度函数,然后分析了我应该能够识别形成我的数据集的不同分布的峰值。 (正确的?) 然后我根据这些聚类质心(密度函数的峰值)对点进行聚类。
您可以在以下位置找到我的数据 (z): https://drive.google.com/file/d/0B3vXKJ_zYaCJLUE3YkVBMmFtbUk/view?usp=sharing
和概率密度函数的图在: https://drive.google.com/file/d/0B3vXKJ_zYaCJTjVobHRBOXo4Tmc/view?usp=sharing
我所做的只是为了跑步
[bandwidth,density,xmesh]=kde(z);
plot(xmesh,density);
我得到的(请看第二个链接)是每个数据点的密度函数有 1 个峰值.... 我认为我做错了什么...... kde函数的默认参数可能是原因吗?
kde(data,n,MIN,MAX)
% data - a vector of data from which the density estimate is constructed;
% n - the number of mesh points used in the uniform discretization of the
% interval [MIN, MAX]; n has to be a power of two; if n is not a power of two, then
% n is rounded up to the next power of two, i.e., n is set to n=2^ceil(log2(n));
% the default value of n is n=2^12;
% MIN, MAX - defines the interval [MIN,MAX] on which the density estimate is constructed;
% the default values of MIN and MAX are:
% MIN=min(data)-Range/10 and MAX=max(data)+Range/10, where Range=max(data)-min(data);
这可能吗?你能告诉我应该在什么基础上改变它们吗?
【问题讨论】:
-
如何定义/检测密度函数中的峰值?
-
我还没有做过,但是我通常使用爬山算法来解决这类问题。当然欢迎任何其他建议。
-
您上传了一个 fig(不是 pdf)文件...
-
是的,我知道。 pdf我的意思是概率密度函数......
-
为什么不在你的帖子中加入这个数字?
标签: matlab cluster-analysis kde