【686】核密度估计,kernel density estimation,KDE说明
https://en.wikipedia.org/wiki/Kernel_density_estimation
核密度估计 Kernel Density Estimation(KDE)
Leveraging crowdsourced gps data for road extraction from aerial imagery
简单理解:就是让原本离散的点形成平滑的密度分布情况
-
最简单的密度分布就是直方图,可以估计出离散点的分布情况,设置不同的带宽会形成不同的分布直方图,可以理解为不同的和密度函数,下图就是对应的例子。虽然离散点不变,但是划分规则不同,因此显示出完全不同的分布,这也说明对于不同核密度函数的选择会产生不同的效果,因为是模拟,因此都有可能,且合适的核密度函数选择很重要。
-
关于核函数的选择,有很多,平时最常用的就是高斯核函数,也就是正态分布曲线,如下所示:
-
下面是一个应用直方图与高斯核函数的对比图
-
For the histogram, first, the horizontal axis is divided into sub-intervals or bins which cover the range of the data: In this case, six bins each of width 2. Whenever a data point falls inside this interval, a box of height 1/12 is placed there. If more than one data point falls inside the same bin, the boxes are stacked on top of each other. (总体直方图所占据的面积总和是1)
-
For the kernel density estimate, normal kernels with standard deviation 2.25 (indicated by the red dashed lines) are placed 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 (compared to the discreteness of the histogram) illustrates how kernel density estimates converge faster to the true underlying density for continuous random variables.(对于高斯核函数而言,因为一共6个点,因此每个点占用的面积就是 1/6,然后最高点就是离散点的位置,这样红色虚线所组成的面积之和就是1,然后再将没一个点的部分所有6个核函数的值进行求和,就得到了蓝色的曲线,该曲线高度平滑,可以平滑的展示离散点的分布。这就是核密度估计。)
-
-
上面介绍的事一维数据,显示成二维曲线,下面是二维数据显示为三维曲线
-
左边为轨迹散点图,右边为高斯核函数绘制的三维图
-
三维图可以明显看出数据分布的平滑分布,如果通过画格子数数量的话,就是类似最下面直方图的方法
-
-
posted on 2022-03-18 11:00 McDelfino 阅读(1346) 评论(0) 编辑 收藏 举报
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
· 凌晨三点救火实录:Java内存泄漏的七个神坑,你至少踩过三个!
2019-03-18 【379】pandas 说明