Questions tagged [cluster-analysis]

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

1
vote
0answers
47 views

How can I parametrically generate a hierarchically clustered network? [on hold]

I'm trying to create an image to illustrate what a large, hierarchically clustered network looks like. The details of the network don't matter, as long as, when plotted, it clearly shows at least a ...
1
vote
0answers
27 views

How to ensure that FindClusters and ClusterClassify have the same cluster name?

I am trying to ensure that both the FindCluster and ClusterClassify function provide the same cluster name. To explain this ...
1
vote
1answer
38 views

Clustering with different variables

I've created a list of associations composed of userId's and average times for different sessions: ...
2
votes
1answer
65 views

Gap Statistic Significance Testing with KMeans / KMedoids

Relatively basic question here about FindClusters / ClusteringComponents. So I have noticed that Mathematica has an option for ...
0
votes
3answers
60 views

TF-IDF matrix question [closed]

I am looking to weight the words (TF-IDF) of a random text by his occurence and showing that on a matrix. I saw there is a project on it but would like to know if it possible to change the ...
1
vote
0answers
64 views

Cluster analysis with constraints on number of clusters and their abundance

How to perform cluster analysis in a set: With the number of clusters bounded but not specified, e.g. $k\in[3,5]$ With a bounded abundance of clusters (the number of elements in each of the clusters),...
0
votes
0answers
59 views

Homogeneity of a function within a region

I have 2 functions; funtion 1: ...
6
votes
1answer
68 views

Determining the Method option that FindClusters uses with AbsoluteOptions

I am trying to determine which method mathematica chooses when using FindClusters. The documentation says that it chooses the best one for the data. I have tried to use ...
1
vote
0answers
62 views

K-medians clustering computation

Is there a built-in function for data clustering using k-medians algorithm? I found out about the ClusterDissimilarityFunction of the ...
0
votes
1answer
106 views

map cellular automaton to planar surface

Im exploring possibility to apply a CA to a portion of a region in an image. Think that I can process an image to identify a region, as an example, a green area. I would like to confine that area, ...
0
votes
0answers
42 views

Clustering irregular (x,y) coordinates

I have coordinates of bubbles rising in a fluid (with some horizontal velocity). I need to cluster them by source. data = data in .nb format Graphic version of the data containing multiple sources ...
1
vote
0answers
91 views

Programming a DBSCAN in Mathematica

FindClusters has a built-in Method called "DBSCAN". You can find it on this page: https://...
2
votes
1answer
142 views

Adjacency Matrix to Clusters of Equal Sizes

I have a system with 72 nodes. I have a binary adjacency matrix $S$ of size $72\times 72$. If $S_{i,j}=1$, then node $i$ is adjacent to node $j$. So, we also have $S_{i,j}=S{j,i}$. So, $S$ is a ...
0
votes
1answer
105 views

How to find clusters with same cluster sizes?

I have a set of 71 data points. Each data point is represented by its latitude and longitude. I want to divide them into 12 clusters. The first 11 cluster will have exactly 6 points each and 12th ...
2
votes
2answers
139 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 ...
1
vote
1answer
83 views

Using Density Histogram on FindCluster

I have some data which I want to put in a DensityHistogram after i have clustered it. The different clusters should have different colors and based on how many are ...
6
votes
1answer
132 views

How do we cluster separate curves in a set of data?

Below, I have included some data. (It is long, but I don't like to host data elsewhere and provide links that might some day be broken.) Plotting this set of data,...
5
votes
1answer
64 views

ClusteringComponent and FindClusters are returning the wrong number of clusters and are inconsistent

I am trying to find the optimum number of clusters in a correlation matrix. To do this I run a clustering algorithm that loops through 3 variables ( number of clusters, ...
0
votes
0answers
29 views

clustering data on a spectrum with a custom distance function

I have recently been faced with a problem on spectral analysis which may find a solution with data clustering techniques. I have an energy spectrum with around 200 energy levels: many of them ...
1
vote
0answers
33 views

How to ask FindClusters to return the loss function value in the output?

I have some data points pts as below:- pts = BlockRandom[SeedRandom[123]; RandomReal[1, {100, 2}]]; Now I want to separate ...
4
votes
0answers
56 views

What is the default method of FindClusters?

I used Method -> Automatic on FindClusters and obtain a cluster autoCts as below:- ...
5
votes
0answers
58 views

How to make the clustering result of version 11.2 and 11.3 same?

I was doing clustering analysis in version 11.2, with codes like below, and then got 12 clusters as the output: ...
1
vote
2answers
67 views

Number of contiguous ones of an element in a 2d binary array

I have a 2d binary array of 0s and 1s. I select an element and would like to know how many 1s are in the contiguous cluster that includes the selected point. If the selected element is 0, the answer ...
7
votes
2answers
228 views

How to Wrap the Points of a 3D Clustering Plot?

I am doing clustering and have a plot as below:- ...
6
votes
0answers
75 views

Why does FindClusters put closer points into different clusters?

I am trying to do clustering and then obtained a plot as below:- ...
1
vote
0answers
57 views

Joining subcluster based on distance

I have the following sequence data: ...
6
votes
3answers
147 views

How to know the layout about these points

I have such points pts=Uncompress[FromCharacterCode[ Flatten[ImageData[Import["http://i.stack.imgur.com/hkAK8.png"],"Byte"]]]]; ...
1
vote
2answers
94 views

How to cluster the elements of a list based on connectivity?

Consider a list (coordpairs) of coordinate pairs as ...
3
votes
1answer
90 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 ...
1
vote
0answers
51 views

How does DominantColors work?

I'm trying to understand the algorithms behind DominantColors[]. Unfortunately Trace[] and ...
4
votes
1answer
63 views

How to specify radius for “MeanShift” Method of FindClusters

I would like to specify the radius used for the "MeanShift" Method of FindClusters. Where ...
0
votes
1answer
108 views

How to segment an image based on MeanEuclideanDistance?

Consider an image (img) as Now I have partitioned the image using the following command parts = ImagePartition[img, 32]; ...
6
votes
0answers
56 views

What method does FindGraphCommunities use with Method -> “Centrality”?

Cross-posted to W Community I would like to know what method FindGraphCommunities uses with the option Method -> "Centrality"...
3
votes
0answers
51 views

“Optimize” find clustering by local optimization

There is a method of clustering in Mathematica named "Optimize" which find clustering by local optimization. Here is the ref http://reference.wolfram.com/language/tutorial/PartitioningDataIntoClusters....
2
votes
0answers
70 views

ClusterClassify and FeatureTypes

I have a dataset that I want to classify in clusters. All values are numbers. For some variables, the values can represent a real measure (a distance, a weight...) but for some other variables, the ...
0
votes
1answer
114 views

How to visualize several groups of points?

I have generated a dataset that clustered some of data points into three groups, the output was three -column data like this: there are some points with X,Y coordinates and I already labeled each of ...
2
votes
0answers
115 views

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

I have a list of 3D points. ...
1
vote
0answers
104 views

How can I rotate labels in a Dendrogram when using pre-clustered data?

I have some pre-clustered data that I want to visualize with Dendrogram. I am using Dendrogram purely for visualization in this ...
7
votes
2answers
135 views

Impact of Linkage and DistanceFunction on Agglomerate clustering

I'm using Agglomerate function to find clusters of my experimental points. I have about 20 points with 10 parameters each. It seems it works fine, but there are plenty of Linkage and DistanceFunction ...
7
votes
0answers
111 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: ...
0
votes
0answers
69 views

How can I improve effect of Clustering of MNIST?

Limit us with Clustering technology, like FindClusters, ClusteringComponents,ClusterClassify,...
5
votes
2answers
119 views

How to detect the frequency of gene pairings in lists of genetic profiles

We have a list of >1000 gene profiles each consisting typically of 4 genes. Many profiles share pairs of identical genes. Can we derive clusters of profiles which share pairs or even trios of genes? ...
14
votes
4answers
585 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 <...
0
votes
0answers
61 views

FindCluster gives same grouping each time in Mathematica 9 and different in 11.1

This is my dataset: ...
3
votes
2answers
669 views

Plot density of discrete data

I have some discrete data in the form {{x1,y1},{x2,y2},...} and when I produce a ListLogLogPlot they look like this: I would ...
5
votes
2answers
179 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: ...
4
votes
1answer
213 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: ...
-5
votes
1answer
80 views

Import, DirectAgglomerate, DendogramPlot- why must I execute every command seperately? [closed]

I have a big distance matrix in a file and I want to do clustering and plot dendgoram. I've tried: ...
8
votes
2answers
245 views

FindClusters doesn't accept custom DistanceFunction

Bug introduced in 11.0 and persisting through 11.1.0 I have a problem with using custom DistanceFunction in FindClusters. To make the issue as simple as possible, consider clustering odd & even ...
3
votes
1answer
55 views

Most Computationally Efficient Way To Rejoin Related List Elements?

I am working with a large list of elements, each of which are assigned five values. The first 3 are coordinates, while the remainder are other important properties. I need to cluster these elements ...