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

learn more… | top users | synonyms (1)

7
votes
3answers
84 views

Cluster numbers into n partitions so that each partitions sum is closest to total/n

For example having data data = {16, 4, 17, 10, 15, 4, 4, 6, 7, 14, 9, 17, 27, 6, 1, 9, 0, 12, 20, 8, 0, 3, 4, 0, 3, 4} I want to cluster them int 4 partitions ...
3
votes
1answer
212 views

Spectral Clustering

I am attempting to implement a spectral clustering routine using Mathematica, but I am encountering difficulties. Using the standard Gaussian similarity function found in section 2.2 of this paper ...
25
votes
4answers
4k 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 ...
1
vote
0answers
44 views

Question on ClusteringComponents [duplicate]

I am fairly new to Mathematica. I've been playing around with ClusteringComponents. Assume we are clustering points in the plane using k-means clustering and ...
0
votes
0answers
47 views

Statistical significance test of FindCluster

I have a list of vectors which could be roughly divided into two clusters. The list is huge so I have to use RandomChoice[list, 20000] to speed up the calculation. ...
-1
votes
1answer
77 views

How can I cluster a continuous percentage? [closed]

I've got a table with 3 columns. 1 is descriptive A 1 is a percentage B 1 is a decimal number C I would like to investigate for the clusters (ie. B is high ad C is low, or viceversa). How can I ...
2
votes
0answers
67 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 ...
5
votes
2answers
403 views

Code elegance and compactness. Help needed with Map, Apply

I need some help with code optimization and compactness. I have a set of two-dimensional points and I can use the Mathematica function FindClusters to find 4 clusters. I'd like to plot the points ...
1
vote
0answers
72 views

How to get the SIFT features of an image?

According to the documentation, the function KeyPoints[] computes features only using SURF, but what about SIFT or FAST features?
2
votes
1answer
249 views

Cluster entities by a combination of values

I can plot the population of zip codes in NY with something like ...
1
vote
1answer
64 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, ...
3
votes
1answer
146 views

Clustering image data by intensity and position

I'd like to apply FindClusters or ClusteringComponents to image data of an indistinct edge, with the goal of segmenting the ...
6
votes
3answers
408 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 ...
2
votes
0answers
110 views

Max iterations in K-means clustering algorithm

I want to use k-means for clustering. I have used the ClusteringComponents function but I said how can I control the max-iteration for k-means ?
1
vote
1answer
87 views

Cluster a time series by labels

I have a time series, tab delimited dataset with the following format ...
1
vote
0answers
64 views

Matrix clustering in Mathematica?

Suppose I have a square matrix $M$, which you can think of as the weighted adjacency matrix of a graph $G$. I want to order the vertices of $G$ in such a way that the entries of the matrix $M$ are ...
6
votes
2answers
168 views

How to get the centroids of the ClusterComponents function

I use the ClusterComponent function to get the k-means clustering: ...
1
vote
1answer
55 views

ClusteringComponents returning only ones

I am trying to use ClusteringComponents without having to specify the number of clusters initially... so the algorithm can find itself the optimal number of clusters... My data is of the form: ...
0
votes
1answer
280 views

Mean path length of randomly generated graphs

I am looking to find the the average path length of 1000 random graphs with the following degree distribution, a few of the vertex degrees are included below ...
1
vote
1answer
70 views

Bug in ClusteringComponents yielding different results on practically same input?

I am using the image below. I want to run a simple ClusteringComponents, using the KMeans method and ...
3
votes
0answers
76 views

k-means clustering in parallel

How can the k-means algorithm for some given distance function be implemented using ParallelMap or other parallel processing program constructs in Mathematica?
2
votes
0answers
60 views

k-means clustering using squared correlation in Mathematica

I am trying to cluster data using the squared correlation coefficient since in the case of my data, -1 correlation is equivalent to 1 correlation (polarities do not matter). How can this be done in ...
5
votes
1answer
148 views

FindClusters giving wrong groupings

I am having trouble getting FindClusters to find the right clustering for this set of data (and many other sets of data similar to it): ...
1
vote
1answer
78 views

Using FindGraphCommunities, write community membership for each vertex to CSV

I have a network that I've loaded into Mathematica, and I've used FindGraphCommunitites[network,Method->"Hierarchical"] to identify the communities in the ...
4
votes
1answer
142 views

Agglomerate output to Graph

I'm using the HierarchicalClustering package to cluster some data. So let's say I have this: ...
2
votes
3answers
301 views

Clustering data sets with multiple variables

I am learning how to cluster large datasets and this maybe a newbie question, but I haven’t found a suitable answer in the Documentation or on this board. My question is best illustrated by an ...
2
votes
1answer
194 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 ...
1
vote
1answer
72 views

What does the VertexMoving method for FindGraphCommunities do?

I've been applying the VertexMoving method to some graph data, and it's producing very useful results. However, I've got no clue as to what this method actually is, and the documentation is ...
11
votes
0answers
184 views

Strategies to find curves on messy data using FindCurvePath

I have a set of data points that correspond to roots of a transcendental equation with respect to a parameter (the abscissa) which, by the properties of the system, define continuous curves (might be ...
0
votes
1answer
157 views

How to efficiently distinguish the rewired edges in WattsStrogatzGraphDistribution?

The WattsStrogatzGraphDistribution function is a way to construct random graphs based on Watts and Strogatz small world model. The ...
7
votes
3answers
277 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: ...
3
votes
1answer
186 views

Clustering of 2D map, based on similarity in spectra

I have experimental 2D-spectroscopy data, in a format similar to this: ...
16
votes
4answers
893 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 ...
3
votes
1answer
119 views

Setting label in DendrogramPlot

I want to create a dendrogram with the labels being a visual representation of the data. Something like this: How can I do that in Mathematica? My attempt so far hasn't been very successful. The ...
6
votes
1answer
184 views

Stopping Agglomerative clustering under a condition in Mathematica

How do I instruct Agglomerative clustering to stop/NOT merging two particular clusters if the distance between the two clusters is larger than a threshold value? I know that we can implement a custom ...
3
votes
1answer
122 views

How to give ClusteringComponents initial values?

I came across a variant of k-means that adds a algorithm to select good starting values called k-means++. ...
5
votes
1answer
698 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 ...
2
votes
1answer
129 views

DirectAgglomerate not working for Large Matrices

I am trying to graphically display a distance matrix with similar elements visually clustered into groups. My original matrix has the elements in a random order so the first thing I do is to change ...
4
votes
3answers
274 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: ...
17
votes
4answers
927 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 ...
4
votes
1answer
174 views

How does DistanceFunction work with images in ClusteringComponents?

Does anyone know the syntax to DistanceFunction? I am trying to define my own function to use with ClusteringComponents; e.g., ...
9
votes
2answers
243 views
3
votes
1answer
269 views

What's the main difference between FindClusters and ClusteringComponents? [closed]

In many cases, FindClusters and ClusteringComponents provide similar results. Options for hierarchical and agglomerative ...
3
votes
1answer
278 views

How to determine cluster membership using FindClusters?

I have a 1000 by 3 data matrix in which for each person we have 3 scores. I want to cluster those persons into 8 cluster using Agglomerative method. I did the clusetring by: ...
0
votes
0answers
36 views

Import/Export Cluster Object [duplicate]

I want to export and then import back in a cluster object from Agglomerate. After the import, the imported object does not behave as a cluster - for example, ClusterSplit does not recognize it as a ...
11
votes
4answers
895 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 ...
8
votes
1answer
259 views

FindClusters for 3D Pancake/Platelet Shapes

I'm looking to properly cluster a dataset of roughly 3 million data points in 3-space. The shapes form closely spaced "clusters" that resemble pancakes. Here is a downsampled dataset: ...
7
votes
2answers
327 views

Different highlight for each cluster in DendrogramPlot

Is there any way to have each cluster in the DendrogramPlot highlight in a different color? I've tried the obvious way but it doesn't work: ...
3
votes
1answer
322 views

Plotting reordered clusters with different colors and joined lines

I would like to show how typical days of energy load (found through clustering of a years worth of data) are spread throughout a year in a single graph with a color for each 'typical day' (or ...