Example of a graph with nodes clustered according to the
spectral clustering algorithm.
Files to download today
- PS4.zip: Graph and mesh data and
some basic template code.
Instructions
The zip package includes the following 3 directories:
- data: This directory contains two sub-folders:
one that contains two graphs on which you can test your
implementation and one with a few example triangle
meshes. The two graphs are represented via 2 files each: the
first, which stores a list of edges (a matrix with
2 columns) and the second, which represents the x,y
coordinates of all of the vertices (useful for
plotting only).
The triangle meshes are stored using the 'off' file
format, which you have already played with. These are
a few different deformations of the same shape
(armadillo). The idea is to test your implementation
to see if it produces consistent clusters (segments)
on the different deformatinos.
- external This directory a few auxiliary
files. Most
importantly, the functions
plot_graph_wfunction takes as input a list of
edges of the graph (in the same format as given by the
data files), the x and y coordinate
of each of the vertices and a function, and draws the
graph, with each node having a color depending on the
function value.
- code . You should use this directory to store
and organize your code. By default it only contains
two files: spectral_clustering.m and
spectral_clustering_shape.m which will help you
to get started with your implementation.