对一维数据使用什么聚类算法?
我有一个数组中的数字列表。每个元素的索引是 X,值是 Y。我如何对这些数据进行分区/聚类? 如果我有一个数组,我只想要一组标记每个分区末尾的值。由于我正在研究 Python,请提及是否有库可以执行相同的操作。
谢谢。
I have a list of numbers in an array. The index of each element is X and the value is Y. How do i go about partitioning/clustering this data?
If i had an array, i just want a set of values which mark the end of each partition. Since I'm working on Python, please do mention if there are libraries to do the same.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
K-Means 是一种非常简单的聚类算法,我想说在进行更复杂的事情之前首先要进行测试。
K-Means 算法 http://en.wikipedia.org/wiki/K-means_clustering
强烈建议进行正确的 K-Means 初始化 http://en.wikipedia.org/wiki/K-means%2B%2B,就像这样。
如果您对 K-Means 不满意,则可以使用 EM 算法和高斯混合 ( http://en .wikipedia.org/wiki/Mixture_model),编码并不太难,您可以使用 K-Means 来初始化它!
这些已经在 Python 中实现了 100 次,检查任何机器学习工具箱。
K-Means is a very simple clustering algorithm, I would say the first to test before going for more complex things.
The K-Means algorithm http://en.wikipedia.org/wiki/K-means_clustering
Proper K-Means initialization is strongly advised http://en.wikipedia.org/wiki/K-means%2B%2B, as it.
If you're not happy with K-Means, then you use EM algorithm with Gaussian mix ( http://en.wikipedia.org/wiki/Mixture_model ), not too hard to code and you can use K-Means to initialize it !
Those have been implemented 100 times in Python, check any machine learning toolbox.