# Questions tagged [cluster-analysis]

Questions on the cluster analysis functions of Mathematica, including the Hierarchical Clustering Package.

29 questions
Filter by
Sorted by
Tagged with
8k views

### K-means clustering

In MATLAB, there is a command kmeans() that divides an array into $k$ clusters and calculates the centroid of each cluster. Is there any command in Mathematica to ...
1k views

### Creating Identification/Classification trees

I have data given in following format; from which I need to create identification/classification trees (three different trees from three different criterion, that is average disorder, gain ratio and ...
197 views

### FindClusters versus ClusteringComponents

[Cross-posted on the Wolfram Community.] I just found out that there's a difference in the number clusters retrieved when using FindClusters and ...
2k views

### Generating an “average curve” from a dense set of “semicontinuous curves” which clear trends

This question is related to a previous one of mine: Partitioning a superset of coordinates into subsets that generate continuous curves, where the challenge was to partition a data set into two ...
1k views

### Visualize cluster distances in DendrogramPlot

I want to perform a cluster analysis using the HierarchicalClustering package. Is there a way to display the inter-cluster distances in a dendrogram plot? An ...
3k views

### Clustering of space-time data

Below is an example of a gaze sequence I recorded during a 3 seconds display. That is, where the eye was at every millisecond. While we should have 3000 points, we are missing some due to blinking. ...
334 views

### Partitioning a superset of coordinates into subsets that generate continuous curves

Consider the data set corresponding to recorded trajectories for a particle: ...
347 views

### User-defined distance functions in FindClusters

I am trying to use FindClusters to segment data points into two special parts data ...
1k views

### Finding connected components in an array

I have an $w\times h$ array with non-negative integers. I wish to partition the set of coordinates $(c,r)$ with $1\leq c \leq w$ and $1\leq r \leq h$, in subsets, so that each subset corresponds to a ...
2k views

### Clustering a set of points

I have a set of 2D points in the square defined by {-1, -1} and {1, 1}. These points typically form compact groups. I need to ...
608 views

### Cluster a signal into areas of equal intensity

Introduction I have a greyscale photograph that I want to partition into areas of equal intensity. This means, that the integral over each partition should be (roughly) equal. There is no unique ...
2k views

### data clustering

I have some data set which i would like to partition into 3 groups a:set 1 b: set 2 c: background. I use FindClusters[] function but as you can see (after ...
705 views

### Morphological Components with periodic boundary conditions

I would like to find the connected(with periodic boundary conditions) components in a large binary matrix. What I've tried, and it does a fair job is: ...
631 views

### How to split data into clusters based on fitting to function

I have data which looks somewhat like this: On the picture, you can see that the data can be described by 2 linear functions - if you manage to split it into 2 groups, each can easily be fitted with <...
176 views

### How to get FindCurvePath to return only one list

As you can see below, FindCurvePath returns only a part of the list, resulting in a partial interpolation. I would like to interpolate all the points. Complete ...
2k views

### Clustering 3D Data Points on a Periodic Cubic Grid

I have a set of 3D data points on a cubic grid. The data can be downloaded from here https://skydrive.live.com/redir?resid=F96524B72DCD75FB!14240 and read into a variable ...
181 views

### Inexplicable results from ClusteringComponents Agglomerate in version 11.1

I have data like this: data = {5, 12, 18, 19, 20, 23, 24, 26}; On Mathematica 11.1, clustering produces a variable final choice of clusters. For example: ...
228 views

### How to rapidly find the nearest pairs of points in different clusters

Background For speed up this question or this question,I have such need. Current try: Suppose I have $3$ clusters of points: ...
346 views

### make specific cluster

I have set of coordinates. I want to make clusters in which every point is within 1.5 distance unit of it's neighbor. ex of point coordinates: ...
429 views

### Hierarchical clustering: convert Mathematica cluster hierarchy to NEWICK format

Can anyone tell me a clever way to convert the hierarchical clustering object, created, say, by Agglomerate or DirectAgglomerate ...
117 views

### Why does FindClusters put closer points into different clusters?

Bug introduced in 11.3 or earlier and persisting through 12.0 Bug isn't present in version 8.0.4 I am trying to do clustering and then obtained a plot as below:- ...
148 views

### How to form multiple clusters of given size from a set of points?

Let us consider a 2 dimensional space. There are 100 points in it. So, each point has its $x$ and $y$ coordinates. I want to form 10 clusters. Each cluster has 10 points. How can I form such ...
124 views

### FindCluster only finds cluster “with a little help”

Currently I made some slides to illustrate clustering. As an example I made a point set of two clusters: ...
255 views

### Agglomerate output to Graph

I'm using the HierarchicalClustering package to cluster some data. So let's say I have this: ...
97 views

### Finding the size of connected clusters with specific patterns in an array

I have a $w \times h$ array with either $-1$ or $+1$. I wish to monitor the size of the largest connected clusters with specific patterns that occur during a Monte Carlo simulation, i.e., a ...
131 views

### How do I detected linear clusters of points in 3D data?

I have a list of 3D points. ...
87 views

### Partitioning a list in n sublists with constrains in their sums

Is there a way to put cluster level limits on clusters? For example, if I run: FindClusters[{1, 2, 3, 4, 4, 6, 7, 10}] I get back two lists, ...