密度聚类dbscan

The idea of having newer algorithms come into the picture doesn’t make the older ones ‘completely redundant’. British statistician, George E. P. Box had once quoted that, “All models are wrong, but some are useful”, meaning that no model is exact enough to certify as cent percent accurate. Reverse claims can only lead to the loss of generalization. The most accurate thing to do is to find the most approximate model.

出现新算法的想法并不能使旧算法“完全冗余”。 英国统计学家George EP Box曾经引述过: “所有模型都是错误的,但有些模型是有用的” ,这意味着没有任何一种模型能够精确到百分之一的精度。 反向主张只能导致泛化。 最准确的事情是找到最近似的模型。

Clustering is an unsupervised learning technique where the aim is to group similar objects together. We are virtually living in a world where our past and present choices have become a dataset that can be clustered to identify patterns in our searches, shopping carts, the books we read, etc such that the machine algorithm is sophisticated enough to recommend the things to us. It is fascinating that the algorithms know much more about us then we ourselves can recognize!

聚类是一种无监督的学习技术,其目的是将相似的对象分组在一起。 实际上,我们生活在一个世界中,过去和现在的选择已成为一个数据集,可以将其聚类以识别我们的搜索,购物车,阅读的书籍等中的模式,从而机器算法足够复杂,可以向您推荐事物我们。 令人着迷的是,这些算法对我们的了解更多,然后我们自己就能意识到!

As already discussed in the previous blog, K-means makes use of Euclidean distance as a metric to form the clusters. This leads to a variety of drawbacks as mentioned. Please refer to the blog to read about the K-means algorithm, implementation, and drawbacks: Clustering — Diving deep into K-means algorithm

如先前博客中已讨论的,K-means利用欧几里得距离作为度量来形成聚类。 如上所述,这导致了各种缺点。 请参阅博客,以了解有关K-means算法,实现和缺点的信息: 聚类-深入探讨K-means算法

The real-life data has outliers and is irregular in shape. K-means fails to address these important points and becomes unsuitable for arbitrary shaped, noisy data. In this blog, we are going to learn about an interesting density-based clustering approach — DBSCAN.

现实生活中的数据存在异常值,并且形状不规则。 K均值无法解决这些重要问题,因此不适用于任意形状的嘈杂数据。 在此博客中,我们将学习一种有趣的基于密度的聚类方法-DBSCAN。

应用程序基于密度的空间聚类— DBSCAN (Density-based spatial clustering of applications with noise — DBSCAN)

DBSCAN is a density-based clustering approach that separates regions with a high density of data points from the regions with a lower density of data points. Its fundamental definition is that the cluster is a contiguous region of dense data points separated from another such region by a region of the low density of data points. Unlike K-means clustering, the number of clusters is determined by the algorithm. Two important concepts are density reachability and density connectivity, which can be understood as follows:

DBSCAN是基于密度的聚类方法,可将数据点密度较高的区域与数据点密度较低的区域分开 它的基本定义是,群集是密集数据点的连续区域,该区域与另一个此类区域之间被数据点的低密度区域分隔开 。 与K均值聚类不同,聚类的数量由算法确定。 密度可达性密度连通 是两个重要的概念,可以理解如下:

“A point is considered to be density reachable to another point if it is situated within a particular distance range from it. It is the criteria for calling two points as neighbors. Similarly, if two points A and B are density reachable (neighbors), also B and C are density reachable (neighbors), then by chaining approach A and C belong to the same cluster. This concept is called density connectivity. By this approach, the algorithm performs cluster propagation.”

“如果一个点位于另一个点的特定距离范围内,则认为该点可以密度达到另一个点。 这是将两个点称为邻居的标准。 类似地,如果两个点A和B是密度可达的(邻居),则B和C也是密度可达的(邻居),则通过链接方法A和C属于同一群集。 这个概念称为密度连接。 通过这种方法,该算法执行集群传播。”

The key constructs of the DBSCAN algorithm that help it determine the ‘concept of density’ are as follows:

DBSCAN算法可帮助确定“密度概念”的关键结构如下:

Epsilon ε (measure): ε is the threshold radius distance which determines the neighborhood of a point. If a point is located at a distance less than or equal to ε from another point, it becomes its neighbor, that is, it becomes density reachable to it.

小量 ε(测量):ε 是确定点附近的阈值半径距离。 如果一个点与另一个点的距离小于或等于ε,则该点成为其相邻点,即它可以达到的密度。

Choice of ε: The choice of ε is made in a way that the clusters and the outlier data can be segregated perfectly. Too large ε value can cluster the entire data as one cluster and too small value can classify each point as noise. In layman terms, the average distance of each point from its k-nearest neighbors is determined, sorted, and plotted. The point of maximum change (the elbows bend) determines the optimal value of ε.

的选择 ε :选择ε时,可以将聚类和离群数据完美地分开。 太大的ε值会将整个数据聚类为一个聚类,而太小的ε值会将每个点归类为噪声。 用外行术语来说,每个点到其k个最近邻居的平均距离被确定,排序和绘制。 最大变化点(肘部弯曲)确定ε的最佳值。

Min points m (measure): It is a threshold number of points present in the ε distance of a data point that dictates the category of that data point. It is driven by the number of dimensions present.

最小点数m (小节):它是数据点的ε距离中存在的阈值点数,它决定了该数据点的类别。 它由当前尺寸的数量驱动。

Choice of Min points: Minimum value of Min points has to be 3. Larger density and dimensionality means larger value should be chosen. The formula to be used while assigning value to Min points is: Min points>= Dimensionality + 1

最小点数的选择:最小点数的最小值必须为3。较大的密度和维数表示应选择较大的值。 将值分配给“最小点”时要使用的公式为: 最小点> =维+ 1

Core points (data points): A point is a core point if it has at least m number of points within radii of ε distance from it.

核心点 (数据点):如果一个点在距其ε距离的半径内至少有m个点,则它是一个核心点。

Border points (data points): A point that doesn’t qualify as a core point but is a neighbor of a core point.

边界点 (数据点):不符合核心点要求但与核心点相邻的点。

Noise points (data points): An outlier point that doesn’t fulfill any of the above-given criteria.

噪声点 (数据点):不满足上述任何标准的异常点。

Algorithm:

算法:

  1. Select a value for ε and m.

    εm选择一个值。

  2. Mark all points as outliers.将所有点标记为离群值。
  3. For each point, if at least m points are present within its ε distance range:

    对于每个点,如果在其ε距离范围内至少存在m个点:

  • Identify it as a core point and mark the point as visited.将其标识为核心点并将该点标记为已访问。
  • Assign the core point and its density reachable points in one cluster and remove them from the outlier list.在一个群集中分配核心点及其密度可达到的点,并将其从异常值列表中删除。

4. Check for the density connectivity of the clusters. If so, merge the clusters into one.

4.检查集群的密度连接。 如果是这样,请将群集合并为一个。

5. For points remaining in the outlier list, identify them as noise.

5.对于剩余在异常值列表中的点,将其标识为噪声。

Example of cluster formation by DBSCAN
DBSCAN形成集群的示例

The time complexity of the DBSCAN lies between O(n log n) (best case scenario) to O(n²) (worst case), depending upon the indexing structure, ε, and m values chosen.

-O之间的DBSCAN位于(N log n)的 (最好的情况下)至O(N²)(最坏情况),取决于所选择索引结构 ,ε,和m值的时间复杂度。

Python code:

Python代码:

As a part of the scikit-learn module, below is the code of DBSCAN with some of the hyperparameters set to the default value:

作为scikit-learn模块的一部分,以下是DBSCAN的代码,其中一些超参数设置为默认值:

class sklearn.cluster.DBSCAN(eps=0.5, *, min_samples=5, metric='euclidean')

eps is the epsilon value as already explained.

如前所述,eps是epsilon值。

min_samples is the Min points value.

min_samples最低分值。

metric is the process by which distance is calculated in the algorithm. By default, it is Euclidean distance, other than that it can be any user-defined distance function or a ‘precomputed’ distance matrix.

metric是在算法中计算距离的过程。 默认情况下,它是欧几里得距离,除了可以是任何用户定义的距离函数或“预计算”距离矩阵。

There are some advanced hyperparameters which will be best discussed in future projects.

有一些高级超参数将在以后的项目中进行最佳讨论。

Drawbacks:

缺点:

  1. For the large differences in densities and unequal density spacing between clusters, DBSCAN shows unimpressive results at times. At times, the dataset may require different ε and ‘Min points’ value, which is not possible with DBSCAN.对于群集之间的密度差异和不相等的密度间距,DBSCAN有时会显示令人印象深刻的结果。 有时,数据集可能需要不同的ε和“最小点”值,而DBSCAN则不可能。
  2. DBSCAN sometimes shows different results on each run for the same dataset. Although rarely so, but it has been termed as non-deterministic.对于同一数据集,DBSCAN有时每次运行都会显示不同的结果。 虽然很少这样,但是它被称为不确定性的。
  3. DBSCAN faces the curse of dimensionality. It doesn’t work as expected in high dimensional datasets.DBSCAN面临着维度的诅咒。 在高维数据集中无法正常工作。

To overcome these, other advanced algorithms have been designed which will be discussed in future blogs.

为了克服这些问题,已经设计了其他高级算法,这些算法将在以后的博客中讨论。

Stay tuned. Happy learning :)

敬请关注。 快乐学习:)

翻译自: https://medium.com/devtorq/dbscan-a-walkthrough-of-a-density-based-clustering-method-b5e74ca9fcfa

密度聚类dbscan


http://www.taodudu.cc/news/show-997544.html

相关文章:

  • 从完整的新手到通过TensorFlow开发人员证书考试
  • 移动平均线ma分析_使用动态移动平均线构建交互式库存量和价格分析图
  • 静态变数和非静态变数_统计资料:了解变数
  • 不知道输入何时停止_知道何时停止
  • 掌握大数据数据分析师吗?_要掌握您的数据吗? 这就是为什么您应该关心元数据的原因...
  • 微信支付商业版 结算周期_了解商业周期
  • mfcc中的fft操作_简化音频数据:FFT,STFT和MFCC
  • r语言怎么以第二列绘制线图_用卫星图像绘制世界海岸线图-第二部分
  • rcp rapido_Rapido使用数据改善乘车调度
  • 飞机上的氧气面罩有什么用_第2部分—另一个面罩检测器……(
  • 数字经济的核心是对大数据_大数据崛起为数字世界的核心润滑剂
  • azure第一个月_MLOps:两个Azure管道的故事
  • 编译原理 数据流方程_数据科学中最可悲的方程式
  • 解决朋友圈压缩_朋友中最有趣的朋友[已解决]
  • pymc3 贝叶斯线性回归_使用PyMC3进行贝叶斯媒体混合建模,带来乐趣和收益
  • ols线性回归_普通最小二乘[OLS]方法使用于机器学习的简单线性回归变得容易
  • Amazon Personalize:帮助释放精益数字业务的高级推荐解决方案的功能
  • 西雅图治安_数据科学家对西雅图住宿业务的分析
  • 创意产品 分析_使用联合分析来发展创意
  • 多层感知机 深度神经网络_使用深度神经网络和合同感知损失的能源产量预测...
  • 使用Matplotlib Numpy Pandas构想泰坦尼克号高潮
  • pca数学推导_PCA背后的统计和数学概念
  • 鼠标移动到ul图片会摆动_我们可以从摆动时序分析中学到的三件事
  • 神经网络 卷积神经网络_如何愚弄神经网络?
  • 如何在Pandas中使用Excel文件
  • tableau使用_使用Tableau升级Kaplan-Meier曲线
  • numpy 线性代数_数据科学家的线性代数—用NumPy解释
  • 数据eda_银行数据EDA:逐步
  • Bigmart数据集销售预测
  • dt决策树_决策树:构建DT的分步方法

密度聚类dbscan_DBSCAN —基于密度的聚类方法的演练相关推荐

  1. 聚类之层次聚类、基于划分的聚类(…

    5.聚类之层次聚类.基于划分的聚类(k-means).基于密度的聚类.基于模型的聚类 目录(?)[-] 1.      一层次聚类 1.      层次聚类的原理及分类 2.      层次聚类的流程 ...

  2. DBSCAN聚类︱scikit-learn中一种基于密度的聚类方式

    文章目录 @[toc] 一.DBSCAN聚类概述 1.伪代码 2.优点: 3.缺点: 4.与其他聚类算法比较 二.sklearn中的DBSCAN聚类算法 1.主要函数介绍: 最重要的两个参数: 其他主 ...

  3. 聚类算法总结 划分法,层次聚类,基于网格,基于密度,谱聚类,基于模型,模糊聚类

    划分法: K-means:随机选择k个类的初始中心,对每一个样本都求解到k个中心点的距离,将它归类到距离最短的中心所在的类别.通过计算与类别内样本平均距离最小的点作为新的中心点.直到类别的聚类中心点不 ...

  4. 【数据挖掘】基于层次的聚类方法 ( 聚合层次聚类 | 划分层次聚类 | 族间距离 | 最小距离 | 最大距离 | 中心距离 | 平均距离 | 基于层次聚类步骤 | 族半径 )

    文章目录 基于层次的聚类方法 简介 基于层次的聚类方法 概念 聚合层次聚类 图示 划分层次聚类 图示 基于层次的聚类方法 切割点选取 族间距离 概念 族间距离 使用到的变量 族间距离 最小距离 族间距 ...

  5. 聚类算法_层次聚类_密度聚类(dbscan,meanshift)_划分聚类(Kmeans)详解

    注: 两整天的成果,谬误之处勿喷 1 聚类概述 样本 没有训练的样本 没有标注的样本 1.1 相似度度量 1.1.1 距离相似度度量 距离度量 dist(oi,oj)dist(o_{i},o_{j}) ...

  6. 基于网格的聚类STING、CLIQUE(机器学习)

    目录 基于网格的聚类 基于网格聚类的典型算法 基于网格的聚类 基于网格的聚类算法的基本思想是将每个属性的可能性分割成许多相邻的区间(例如将属性的值域离散化处理) 创建网格单元的集合,将数据空间划分为许 ...

  7. 基于模型的聚类和R语言中的高斯混合模型

    介绍 四种最常见的聚类方法模型是层次聚类,k均值聚类,基于模型的聚类和基于密度的聚类 . 最近我们被客户要求撰写关于聚类的研究报告,包括一些图形和统计输出. 可以基于两个主要目标评估良好的聚类算法: ...

  8. 【数据挖掘】基于密度的聚类方法 - DBSCAN 方法 ( K-Means 方法缺陷 | 基于密度聚类原理及概念 | ε-邻域 | 核心对象 | 直接密度可达 | 密度可达 | 密度连接 )

    文章目录 I . K-Means 算法在实际应用中的缺陷 II . K-Means 初始中心点选择不恰当 III . K-Means 优点 与 弊端 IV . 基于密度的聚类方法 V . 基于密度的聚 ...

  9. 【数据挖掘】聚类算法 简介 ( 基于划分的聚类方法 | 基于层次的聚类方法 | 基于密度的聚类方法 | 基于方格的聚类方法 | 基于模型的聚类方法 )

    文章目录 I . 聚类主要算法 II . 基于划分的聚类方法 III . 基于层次的聚类方法 IV . 聚合层次聚类 图示 V . 划分层次聚类 图示 VI . 基于层次的聚类方法 切割点选取 VII ...

最新文章

  1. 服务器架设笔记——多模块和全局数据
  2. 经典面试题:ES如何做到亿级数据查询毫秒级返回?
  3. Homework 8 测试计划
  4. C# foreach迭代器
  5. android webview sql database,websql在openDatabase报version mismatch错误,请问怎么解决?
  6. 【Linux网络编程学习】阻塞、非阻塞、同步、异步以及五种I/O模型
  7. Python 中使用help()命令后如何退出
  8. iPhone13如何设置卡1和卡2收发信息
  9. 魔兽争霸---兽族打法
  10. Word文档如何去掉最后一页的页码且不会影响其它页的页码
  11. Spring-boot JPA笔记 Failed to create query for method public abstract 踩坑记录~
  12. 数据铁笼-郑州Android项目ViewPager刷新问题
  13. ORA-01950: 对表空间 'USERS' 无权限
  14. 关于 SY8120I 的DC-DC的降压芯片的学习(12V降至3.3V)
  15. Android图片的裁剪
  16. 498 对角线遍历(找规律)
  17. 数字人民币解决中小企收付难点
  18. 互转(经纬度、地心坐标、东北天坐标)
  19. 个人对PIN码的基本理解
  20. DNS flood攻击分析

热门文章

  1. matlab实现二项分布
  2. apply()与call()
  3. vs2015web项目无法加载64位c++的dll,提示试图加载不正确的格式
  4. Ocelot中文文档入门
  5. 调用百度 Echarts 显示重庆市地图
  6. VirtualBox 虚拟机复制
  7. Andrew Ng机器学习之一 导论
  8. 【ASP.NET Web API教程】3.3 通过WPF应用程序调用Web API(C#)
  9. node.js安装部署测试
  10. 【362】python 正则表达式