数据聚类方法
我正在用 C# 编写一个程序,其中在图像上显示一组 200 个点。然而,这些点往往会聚集在不同的区域,我正在寻找一种“聚集”的方法。换句话说,可以在聚集点周围画一个圆/椭圆。
有没有人见过任何方法可以做到这一点?我听说过 K-means 聚类,但我不知道如何在 C# 中实现它。
有什么最喜欢的实现吗?
I am writing a program in C# in which I have a set of 200 points displayed on an image. However, the points tend to cluster in various regions, and I am looking to find a way to "cluster." In other words, maybe draw a circle/ellipse around the clustered points.
Has anyone seen any way to do this? I have heard about K-means clustering, but I am not sure how to implement it in C#.
Any favorite implementations out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
K-Means 将为您提供簇的中心和组成点的列表。然后,您可以围绕该点以组成点的最大(或平均)距离为半径绘制一个圆。或者您可以计算点的凸包并将其用作簇周围的“包络”。
K-Means 的一个有用扩展是 k-means++ 修改,它可以更好地选择初始坐标。
K-Means will give you the centre of the cluster and a list of component points. You could then draw a circle around that point at a radius which is the maximum (or mean) distance of the component points. Or you could calculate the Convex Hull of the points and use this as an "envelope" around the cluster.
A useful extension of K-Means is the k-means++ modification which does a better job of choosing initial coordinates.