Using manifold learning techniques (aka diffusion maps, Laplacian eigenmaps, intrinsic Fourier analysis) this file recovers the true, two-dimensional structure of a dataset of points embedded in 3D.
how to add some image to this code to check dimensionality reduction
First, note that these type of algorithms use the eigenvectors of a diffusion operator to map the data to a new space. The diffusion operator is N-by-N, where N is the number of points in the dataset, so there are N possible eigenvectors to use in this mapping. Typically much fewer than N eigenvectors are used in practice because 1.) reducing dimensionality means you want fewer coordinates to describe each point and 2.) the number of degrees of freedom in a geometrically structured dataset are typically less than the number of points, making dimensionality reduction possible. It turns out that you want the eigenvectors associated with one of the diffusion operators spectrum, depending on how it is defined.
As I've defined it, the diffusion operator (matrix DO) is a sparse matrix (very few nonzero entries) so I use eigs to compute eigenvectors... DO also has eigenvalues that are real and less than or equal to 1. So I ask eigs for the 10 largest algebraic ('la') nvec eigenpairs.
Hi Kye Taylor,
Can you explain a bit about the reason why you choose to use "eigs" function with "la" option ?
Although the implementation is more in line with Laplacian eigenmaps, I chose to include "diffusion map" in the title since the concept is the same.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.