This Matlab code can be used to reproduce experiments reported in the paper The Weight-Shape Decomposition of Density Estimates: A Framework for Clustering and Image Analysis Algorithms (link will be provided shortly).
Run fig1.m. The first two lines can be used to control which of the graphs will be generated
Run fig2.m
Run PerformReplicaDynamics.m on the data from the file crabs.csv, after projecting the data onto PC2 and PC3.
To obtain the final cluster association, run PerformFinalClustering.m
Two alternatives to obtain the data:
- Download all spectra data from http://smass.mit.edu/catalog.php, and preprocess each spectrum using
PreprocessSpectrum.m, which makes sure all spectra have a common sampling grid, and which performs some additional preprocessing steps. - Instead, you can use the matrix
datain the fileasteroid_data.mat.
Then, run PerformHierarchicalReplicaDynamics.m on the data.
Run fig6.m and fig7.m.