Kernel density estimation

Kernel density estimation

This comes from https://en.wikipedia.org/wiki/Kernel_density_estimation
In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of a random variable. Kernel density estimation is a fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. In some fields such as signal processing and econometrics it is also termed the Parzen–Rosenblatt window method, after Emanuel Parzen and Murray Rosenblatt, who are usually credited with independently creating it in its current form.

Definition

Let (x1,x2,,xn) be an independent and identically distributed sample drawn from some distribution with an unknown density ƒ. We are interested in estimating the shape of this function ƒ. Its kernel density estimator is

f^_h(x)=1n_i=1nK_h(xx_i)=1nh_i=1nK(xx_ih)

where K(•) is the kernel — a non-negative function that integrates to one and has mean zero — and h > 0 is a smoothing parameter called the bandwidth. A kernel with subscript h is called the scaled kernel and defined as Kh(x) = 1/h K(x/h). Intuitively one wants to choose h as small as the data allow; however, there is always a trade-off between the bias of the estimator and its variance. The choice of bandwidth is discussed in more detail below.A range of kernel functions are commonly used: uniform, triangular, biweight, triweight, Epanechnikov, normal, and others. The Epanechnikov kernel is optimal in a mean square error sense,though the loss of efficiency is small for the kernels listed previously, and due to its convenient mathematical properties, the normal kernel is often used, which means K(x) = ϕ(x), where ϕ is the standard normal density function.
The construction of a kernel density estimate finds interpretations in fields outside of density estimation.
For example, in thermodynamics, this is equivalent to the amount of heat generated when heat kernels (the fundamental solution to the heat equation) are placed at each data point locations xi. Similar methods are used to construct discrete Laplace operators on point clouds for manifold learning.
Kernel density estimates are closely related to histograms, but can be endowed with properties such as smoothness or continuity by using a suitable kernel. To see this, we compare the construction of histogram and kernel density estimators, using these 6 data points: x1 = −2.1, x2 = −1.3, x3 = −0.4, x4 = 1.9, x5 = 5.1, x6 = 6.2. For the histogram, first the horizontal axis is divided into sub-intervals or bins which cover the range of the data. In this case, we have 6 bins each of width 2. Whenever a data point falls inside this interval, we place a box of height 1/12. If more than one data point falls inside the same bin, we stack the boxes on top of each other.
For the kernel density estimate, we place a normal kernel with variance 2.25 (indicated by the red dashed lines) on each of the data points xi. The kernels are summed to make the kernel density estimate (solid blue curve). The smoothness of the kernel density estimate is evident compared to the discreteness of the histogram, as kernel density estimates converge faster to the true underlying density for continuous random variables.
这里写图片描述
从上图可以看出,KDE可以看成是一个个标准正态函数的叠加。
具体的带宽选择(bandwidth selection)不做讨论。

### 回答1: 核密度估计(Kernel Density Estimation)是一种通过概率密度函数的方式对数据进行分布估计的非参数方法。该方法可以对数据进行平滑处理,并估计出数据的概率密度函数,从而更好地理解数据的分布情况。在核密度估计中,通过选取一个核函数来估计数据的概率密度函数,常用的核函数有高斯核函数、矩形核函数、三角核函数等。核密度估计在数据分析、信号处理、图像处理等领域有着广泛的应用。 ### 回答2: 核密度估计(Kernel Density Estimation)是一种非参数统计学方法,用于估算概率密度函数(PDF)的形状和位置。 核密度估计的核心思想是通过在每个数据点周围放置核函数来创建平滑的密度估计。核函数是一个标准的概率密度函数,它在数据点周围生成一个密度窗口,并将每个数据点的贡献从它们的位置向密度窗口中积累。 当数据点越集中在一起,核函数的数量会增加,产生更平坦的密度窗口来避免过拟合。数据点距离越远,核函数的数量就会减少,产生更尖锐的密度窗口来捕捉较小的细节。 核密度估计还包含一个重要的参数,带宽(bandwidth),它控制了核函数窗口的大小。当带宽较小时,密度曲线会变得更窄,这可能会导致低偏差但高方差的估计。相反,当带宽较大时,密度曲线会变得更平坦,这可能会导致高偏差但低方差的估计。 核密度估计可以用于可视化和比较数据分布,或者作为其他统计方法的前提,例如分类和聚类问题。由于它是一种非参数方法,因此它不依赖于假设或先验分布,因此可以应用于多种数据集和统计问题中。 ### 回答3: Kernel density estimation是一种非参数统计方法,它可以用来估计概率密度函数。简单来说,它在数据点处放置一些核函数,然后将它们加起来得到密度估计。核函数可以是任何连续函数,且它必须是关于原点对称的非负函数,积分以后等于1。 Kernel density estimation的优点在于可以处理非常复杂的概率分布,而不需要假设一个具体的分布类型。这个方法有着非常广泛的应用,其中最常用的是在数据分析、数据挖掘、模式识别和信号处理等领域。 Kernel density estimation的实现过程可以分为三个步骤:核函数的选择、带宽的选择和估计密度函数。对于核函数的选择,通常选择高斯核函数或Epanechnikov核函数。高斯核函数的形式为$K(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2}$,Epanechnikov核函数的形式为$K(x)=\frac{3}{4}(1-x^2)$。带宽的选择通常使用交叉验证来确定。在估计密度函数时,可以通过对核函数进行平移和缩放得到不同的密度估计,然后将它们平均起来得到最终的估计结果。当数据点变得非常多的时候,随着核函数密度的增加,会导致估计结果的波动性也随之增加,可以通过增加带宽来缓解导致的问题。 总的来说,kernel density estimation是一种非常有用的统计方法,在许多实际应用中都有着广泛的应用,并且它的可解释性和伸缩性可以满足许多实际问题的需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值