Questions tagged [cluster-analysis]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Identifying and tracking cluster elements in ClusterClassify for multiple time-steps of data

I have multiple time-steps of {x,y,z}coordinates data for some atoms. I would like to cluster the data for each frame and later identify how cluster compositions change and how each atom changes from ...
user avatar
  • 515
5 votes
1 answer
91 views

K-Mean Clustering Algorithm

I have implemented the k-Means Clustering Algorithm using the Wolfram Language. However, I think it can be more efficient. Do you have any idea how to make it more efficient (e.g., by removing the ...
user avatar
2 votes
0 answers
97 views

Implement of faster(maybe paralleled) K-Means clustering

I am writing an algorithm that needs to add noise to the centroid of each iteration on top of KMeans. Therefore, I need to implement a custom KMeans function. I checked out the methods in Mathematica ...
user avatar
0 votes
0 answers
31 views

FindClique does not find all cliques? [duplicate]

Consider the following example matrix M ...
user avatar
  • 11.5k
7 votes
1 answer
140 views

How can I add legends in the ClusteringComponents function?

I am trying to do color separation on this image using ClusteringComponents function (following an example on Wolfram Mathematica webpage). I will like to have a legend identifying each segmented ...
user avatar
  • 595
1 vote
0 answers
49 views

FindClusters - Looking for advice in finding Clusters of Parameters

hope you're doing well I'm actually working with sets of parameters. For the sake of simplicity and replicability I'm formulating a general question altough it is related to this other question in ...
user avatar
  • 575
0 votes
1 answer
121 views

Where can I start studying a cluster of points on a scatter plot?

I'm not very experienced with Mathematica, please be patient.. I've a small dataset with just 2 columns that you can download here. The first column represents the amount of money earned every 1000 ...
user avatar
  • 518
1 vote
1 answer
58 views

Why do the points in a curve are connected to those in another after FindClusters?

I have a few questions about the function FindClusters. There's two group points data, and the following figures are obtained from these data. Figure 1-1 is the the ...
user avatar
  • 663
0 votes
1 answer
57 views

How to obtain the grouped separate line curves from the disorder data?

The sample point data and codes are listed as following. The point-image tells us that the data can be divided into nine groups. However, why are they divided into two groups by ...
user avatar
  • 663
0 votes
1 answer
44 views

How to plot clusters with binary matrix and coordinates?

I have to lists, xcor and ycor that contain the $x$-axis and $y$-axis coordinates of $N$ nodes. The nodes are divided into $C$ non overlapping clusters. The clustering information is provided in a ...
user avatar
2 votes
1 answer
73 views

Determine clusters from distance information?

Consider the following example. Define, e.g., 3 clusters with 30 elements each, as follows: ...
user avatar
  • 11.5k
2 votes
0 answers
99 views

How do I perform volume rendering on image slices imported from a directory on my local machine?

I have a set of image slices (in .MHA and DICOM formats) in a folder on my local machine. I will like to import these slices, perform rendering to get 3D volume, perform "ClusterComponents" ...
user avatar
  • 595
3 votes
1 answer
97 views

How to create random isolated clusters periodically?

Let's assume we have a $n \times n$ grid repeated periodically, and I want to create some random isolated patches on it (and assign some value to those grid points). For a simple example consider this ...
user avatar
  • 15.5k
0 votes
0 answers
29 views

FindClusters Hamming Distance giving error

I am trying to run FindClusters[hex, DistanceFunction -> HammingDistance[IntegerDigits[#, 2, 8], IntegerDigits[0, 2, 8]] &] over a list of data but I keep ...
user avatar
  • 465
1 vote
1 answer
90 views

How can I make a clustered heatmap from an unclustered matrix?

I have a similarity matrix and when I plot it as a heatmap, it looks like: I have tried using 'Agglomerate' to cluster the underlying matrix but I cannot figure out how to get the clusters to show in ...
user avatar
  • 301
1 vote
1 answer
80 views

What is the best way to draw cluster for every station?

I have a binary matrix "X" of U rows and N columns. Each row of X has 1 to maximum 3 ones. Each row corresponds to a subscriber and every column corresponds to a service point. So, the ones ...
user avatar
0 votes
1 answer
43 views

Cluster Trend Data

I am trying to cluster trend data similar to that created by data = Table[ RandomReal[{-1, 1}, 20] + 10 offset, {offset, 1, 10, 1}] // Flatten This data is ...
user avatar
  • 191
1 vote
0 answers
101 views

Running NonlinearModelFit in more one kernel simultaneously [closed]

I want to perform a nonlinear least square fit of data points upto 3000. Because the model I provide is huge polynomials with 300 to 400 fitting parameters to be estimated, my mac i7 computer proceeds ...
user avatar
  • 61
2 votes
1 answer
144 views

Making animation based on COVID-19 data [closed]

There is an animation of the growth and spread of COVID-19 cases worldwide at http://www.healthmap.org/covid-19 My question is how do I make the same animation using Mathematica, also analyze the ...
user avatar
  • 2,944
2 votes
1 answer
164 views

Find clusters of positive correlations

I have a square matrix that shows relationships between 71 plants: 1 is a positive, -1 is negative, 0 is inconclusive and blanks are unknown: I would like find the largest groups of plants that only ...
user avatar
5 votes
0 answers
111 views

How to force FindClusters to return a specific number of clusters?

I am using FindClusters with the Method -> "KMedoids" option. I am specifying a desired number of clusters. It returns with many fewer than the desired number. Is there a way to force it ...
user avatar
  • 1,857
2 votes
1 answer
37 views

Consistent pixel assignments in ClusteringComponents?

I have a large dataset of SEM micrographs I am trying to binarily segment via ClusteringComponents, and it has seemed to be the most accurate method compared to the other binarization functions, e.g. ...
user avatar
5 votes
1 answer
95 views

Divide a list of points into clusters based on the gap between them

I would like to know how I can divide the attached list of points to as many clusters as possible based on the gap between the patches. Then I can decide which one should be kept and which remove. I ...
user avatar
1 vote
1 answer
91 views

Generate clusters based off clusters in previous time step?

Here's the set-up: I'm generating data based on a process, but the important thing is that eventually the data diverges and starts forming branches. This is a close up of some of the behavior: The ...
user avatar
  • 379
2 votes
1 answer
79 views

How to get center points of an images with different resolution

I have an images of particles and I want to get the center point coordinates for each particle. I can get the coordinates with other imaging tools, but since my calculations are in mathematica i want ...
user avatar
6 votes
1 answer
141 views

How to TextRecognize sparse grid of tabular data?

I cannot give the actual image (contains private information) but the results of ...
user avatar
  • 39.3k
2 votes
0 answers
71 views

Clustering or Grouping by list of similar strings

I have gathered some sports data from over 40 different sources. I now need to get all the games to "match up", "grouped", "clustered", or "aligned" so all the information for one game is in one list....
user avatar
  • 1,269
1 vote
1 answer
48 views

Nearest returning s different length of output with same input data [closed]

I am trying to classify a list of 2D data points into different clusters based on the Euclidean distance between the points and the clusters' centroids, i.e. the point will be classify into the ...
user avatar
1 vote
1 answer
54 views

Building a nine - region cluster chart but, getting inaccurate plot-legend when empty subregions are present

This is a follow up question to the one submitted at the following: Stack exchange Link I quickly get to the subject: ...
user avatar
4 votes
2 answers
169 views

Building a nine - region cluster chart with Tooltip to display labels associated with 2D points

I'm attempting to build a nine-region cluster chart using Tooltip to display labels associated with 2-D points also displayed on it. I do NOT want to use "FindClusters". I want to design my own ...
user avatar
2 votes
0 answers
88 views

FindClusters giving complete wrong groups from very simple array

Bug introduced in 8.0.4 or earlier and later fixed in 11.3 or earlier. I've been trying to use FindClusters function in Mathematica and it wasn't working well when ...
user avatar
  • 133
1 vote
0 answers
74 views

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

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 ...
user avatar
1 vote
0 answers
92 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 ...
user avatar
  • 5,172
1 vote
1 answer
57 views

Clustering with different variables

I've created a list of associations composed of userId's and average times for different sessions: ...
user avatar
  • 15
2 votes
1 answer
128 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 ...
user avatar
0 votes
3 answers
526 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 ...
user avatar
1 vote
0 answers
104 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),...
user avatar
  • 365
0 votes
0 answers
70 views

Homogeneity of a function within a region

I have 2 functions; funtion 1: ...
user avatar
  • 137
7 votes
2 answers
212 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 ...
user avatar
  • 73
1 vote
0 answers
118 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 ...
user avatar
  • 113
0 votes
1 answer
171 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, and ...
user avatar
2 votes
1 answer
269 views

Programming a DBSCAN in Mathematica

FindClusters has a built-in Method called "DBSCAN". You can find it on this page: https://...
user avatar
2 votes
1 answer
225 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 ...
user avatar
0 votes
1 answer
135 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 ...
user avatar
2 votes
2 answers
178 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 ...
user avatar
1 vote
1 answer
116 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 ...
user avatar
6 votes
1 answer
176 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,...
user avatar
  • 21.5k
5 votes
1 answer
200 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, ...
user avatar
0 votes
0 answers
64 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 ...
user avatar
1 vote
0 answers
42 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 ...
user avatar
  • 3,389