File Exchange

image thumbnail

Fast and efficient spectral clustering

version 1.10.0.0 (11.3 MB) by Ingo
Perform fast and efficient spectral clustering algorithms

39 Downloads

Updated 13 Sep 2012

View License

SpectralClustering performs one of three spectral clustering algorithms (Unnormalized, Shi & Malik, Jordan & Weiss) on a given adjacency matrix. SimGraph creates such a matrix out of a given set of data and a given distance function.

==================================
UPDATE 09/13/2012

This major update to the final version includes
[+] Full GUI
[+] Several Plot Options: 2D/3D, Star Coordinates, Matrix Plot
[+] Save Plots
[+] Save and Load all kind of data (pure data, similarity graph, clustered data)
[+] Differentiates between already labeled and unlabeled data (see README).
==================================

The code has been optimized (within Matlab) to be both fast and memory efficient. Please look into the files and the Readme.txt for further information.

References:
- Ulrike von Luxburg, "A Tutorial on Spectral Clustering", Statistics and Computing 17 (4), 2007

If there are any questions or suggestions, I will gladly help out. Just contact me at admin (at) airblader (dot) de

Comments and Ratings (23)

a a

It shows :
Error using kmeans (line 167)
Invalid data type. The first argument to KMEANS must be a real array.

(I tried using W= SpectralClustering([[0,0.1,0];[0.1,0.1,0.1];[0.1,0,0]],2,2)
The U matrix is imaginary

Amazing job, thank you so much, it helped a lot.

Jinshan

It gives the following error when dataset is loaded. I loaded .csv file

Error using csvread (line 34)
File not found.

Error in guiMain>btnLoadData_Callback (line 51)
handles.Data = csvread(fullfile(relativepath(handles.PathName), ...

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in guiMain (line 18)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)guiMain('btnLoadData_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback

Please help

Zhou Yirong

Oliver

It has a error when run it.

??? Error: File: D:\MATLAB7\work\SpectralClustering\files\GUI\guiMain.m Line: 22 Column: 38
Missing variable or function.
Error in ==> Main at 15
guiMain;
How should i do?

qiang shang

Fanxing Ji

Thank you very much

HBst

Ingo

@Hanan That sure will be a test and I assume you need a good computer, but I think it should be possible. You would just have to test it, though.

does this package supports "large" datasets of 100,000 rows on 500 columns?

Javier

This program fails on Matlab's Linux version since the relativepadth() function returns the relative path in lower letters.

The solution is to use an improved version of relativepath such as this one:
http://www.mathworks.com/matlabcentral/fileexchange/41253-improved-relativepath-m

Thanks!

Ingo

@BD Knight: Take a look at the SpectralClustering.m and the SimGraph_xxx.m files. Those are really all you need and they are well documented.

Eric T

Instructions on using command line? I need clustering embedded deeply in other tasks, multiple times, so using a GUI is not an option.

Ingo

@leile: The code supports data with any dimension. By the way, a major update will be released as soon as I handed my thesis in. This will include a fully functional GUI.

leila

Does the code support 3d data?

Xiao

Yo Yo

Jeff H

Nicely done; simple and efficient code.

Updates

1.10.0.0

Final update including full GUI and more. See description for details.

1.8.0.0

Included acknowledgements

1.7.0.0

- Fixed critical mistake when creating similarity graphs

- Restructured some of the code

1.6.0.0

Fixed critical bug when creating sparse matrices

Demo now plots similarity graph (only use for few data points!)

Minor changes

1.5.0.0

fixed wrong code in demo file

1.4.0.0

Got rid of redundant code

1.3.0.0

Minor updates

1.1.0.0

- Updated some files
- Included Demo

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

ImageSegmentation/

datasets/rainbowdash/

files/

files/GUI/

files/GUI/funcs/

files/GUI/funcs/getFuncs/

files/GUI/funcs/plotFuncs/

files/GUI/funcs/setFuncs/

files/GUI/funcs/toggleFuncs/

files/SimilarityGraph/

files/other/