Skip to main content

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
23 views

FindClusters with custom DistanceFunction

Let we have an array of integers e.g. Range@365. Each index has a specific value by which clusterization of integers should be done. But these values cannot be ...
lesobrod's user avatar
  • 1,729
0 votes
0 answers
35 views

Why do plots change in dependence on sample order?

I suggest two identical data set dat1 and dat2, save the order of samples is different. After selecting the first or the second data, the SCORE and LOADING plots are different. This seems to be in ...
Victor Volkov's user avatar
1 vote
1 answer
114 views

Extract the latent space learned from a Neural Network

I would like to visualize and cluster vectors learned in the latent space of a Neural Network. I am trying to cluster audio tokens, but I don't know what they represent. So the task is to ...
user305883's user avatar
0 votes
0 answers
80 views

How can I cluster Iris data by GaussianMixture method into three parts?

Iris data has three kinds of labels. ...
HyperGroups's user avatar
  • 8,619
5 votes
1 answer
89 views

FindClusters behaves strangely when an argument for number of clusters is passed

I have a question about FindClusters function. It seems that it behaves rather strangely when I pass a specific dataset to it. I am trying to use it in a bigger set ...
Sisko's user avatar
  • 65
0 votes
0 answers
60 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 ...
bhopshang's user avatar
  • 739
6 votes
1 answer
170 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 ...
LambdaHaskell's user avatar
2 votes
0 answers
134 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 ...
Charmbracelet's user avatar
0 votes
0 answers
31 views

FindClique does not find all cliques? [duplicate]

Consider the following example matrix M ...
Kagaratsch's user avatar
7 votes
1 answer
143 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 ...
Dean's user avatar
  • 655
1 vote
0 answers
84 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 ...
nuwe's user avatar
  • 645
0 votes
1 answer
135 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 ...
Revious's user avatar
  • 540
1 vote
1 answer
67 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 ...
likehust's user avatar
  • 693
0 votes
1 answer
63 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 ...
likehust's user avatar
  • 693
0 votes
1 answer
69 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 ...
MGK's user avatar
  • 565
2 votes
1 answer
169 views

Determine clusters from distance information?

Consider the following example. Define, e.g., 3 clusters with 30 elements each, as follows: ...
Kagaratsch's user avatar
2 votes
0 answers
115 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" ...
Dean's user avatar
  • 655
3 votes
1 answer
108 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 ...
Sumit's user avatar
  • 15.9k
0 votes
0 answers
39 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 ...
skyfire's user avatar
  • 477
2 votes
1 answer
229 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 ...
Jamie's user avatar
  • 321
1 vote
1 answer
89 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 ...
MGK's user avatar
  • 565
0 votes
1 answer
57 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 ...
OpticsMan's user avatar
  • 576
1 vote
0 answers
181 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 ...
george's user avatar
  • 71
2 votes
1 answer
157 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 ...
thils's user avatar
  • 3,268
2 votes
1 answer
223 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
157 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 ...
abwatson's user avatar
  • 1,919
3 votes
1 answer
47 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. ...
Christopher Moore's user avatar
5 votes
1 answer
161 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 ...
Mehdi Ebadi's user avatar
1 vote
1 answer
117 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 ...
Illari's user avatar
  • 409
2 votes
1 answer
105 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 ...
Racaio Cmoto's user avatar
6 votes
1 answer
161 views

How to TextRecognize sparse grid of tabular data?

I cannot give the actual image (contains private information) but the results of ...
Edmund's user avatar
  • 42.4k
2 votes
0 answers
117 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....
Ray Troy's user avatar
  • 1,299
1 vote
1 answer
50 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 ...
WeiShan Ng's user avatar
1 vote
1 answer
56 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: ...
Gilmar Rodriguez Pierluissi's user avatar
4 votes
2 answers
187 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 ...
Gilmar Rodriguez Pierluissi's 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 ...
Fábio's user avatar
  • 133
1 vote
0 answers
92 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 ...
andring's user avatar
  • 163
1 vote
0 answers
146 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 ...
dearN's user avatar
  • 5,351
1 vote
1 answer
61 views

Clustering with different variables

I've created a list of associations composed of userId's and average times for different sessions: ...
Lucy's user avatar
  • 15
2 votes
1 answer
173 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 ...
Cameron F.'s user avatar
0 votes
3 answers
779 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 ...
Tom Peterson's user avatar
1 vote
0 answers
143 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),...
Druid's user avatar
  • 395
0 votes
0 answers
72 views

Homogeneity of a function within a region

I have 2 functions; funtion 1: ...
Alper91's user avatar
  • 137
8 votes
2 answers
300 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 ...
Mike's user avatar
  • 83
1 vote
0 answers
131 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 ...
wklm's user avatar
  • 113
0 votes
1 answer
208 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 ...
user305883's user avatar
2 votes
1 answer
339 views

Programming a DBSCAN in Mathematica

FindClusters has a built-in Method called "DBSCAN". You can find it on this page: https://...
Terry McGovern's user avatar
2 votes
1 answer
299 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 ...
MGK's user avatar
  • 565
0 votes
1 answer
162 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 ...
MGK's user avatar
  • 565
2 votes
2 answers
211 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 ...
MGK's user avatar
  • 565