rosenblatt matlab,核密度估计(高效可靠)

Kernel Density Estimator

% Reliable and extremely fast kernel density estimator for one-dimensional data;

% Gaussian kernel is assumed and the bandwidth is chosen automatically;

% Unlike many other implementations, this one is immune to problems

% caused by multimodal densities with widely separated modes (see example). The

% estimation does not deteriorate for multimodal densities, because we never assume

% a parametric model for the data.

% INPUTS:

% 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);

% OUTPUTS:

% bandwidth - the optimal bandwidth (Gaussian kernel assumed);

% density - column vector of length 'n' with the values of the density

% estimate at the grid points;

% xmesh - the grid over which the density estimate is computed;

% - If no output is requested, then the code automatically plots a graph of

% the density estimate.

% cdf - column vector of length 'n' with the values of the cdf

% Reference:

% Kernel density estimation via diffusion

% Z. I. Botev, J. F. Grotowski, and D. P. Kroese (2010)

% Annals of Statistics, Volume 38, Number 5, pages 2916-2957.

%

% Example:

% data=[randn(100,1);randn(100,1)*2+35 ;randn(100,1)+55];

% kde(data,2^14,min(data)-5,max(data)+5);

% Notes: If you have a more reliable and accurate one-dimensional kernel density

% estimation software, please email me at botev@maths.uq.edu.au

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值