partition-problem

1D Number Array Clustering [duplicate]

≡放荡痞女 提交于 2019-11-26 15:48:01
Possible Duplicate: Cluster one-dimensional data optimally? So let's say I have an array like this: [1,1,2,3,10,11,13,67,71] Is there a convenient way to partition the array into something like this? [[1,1,2,3],[10,11,13],[67,71]] I looked through similar questions yet most people suggested using k-means to cluster points, like scipy , which is quite confusing to use for a beginner like me. Also I think that k-means is more suitable for two or more dimensional clustering right? Are there any ways to partition an array of N numbers to many partitions/clustering depending on the numbers? Some

1D Number Array Clustering [duplicate]

你。 提交于 2019-11-26 04:38:00
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Cluster one-dimensional data optimally? So let\'s say I have an array like this: [1,1,2,3,10,11,13,67,71] Is there a convenient way to partition the array into something like this? [[1,1,2,3],[10,11,13],[67,71]] I looked through similar questions yet most people suggested using k-means to cluster points, like scipy, which is quite confusing to use for a beginner like me. Also I think that k-means is more