Spectral Embedding
Source header: cuvs/preprocessing/spectral_embedding.hpp
Types
preprocessing::spectral_embedding::params
Parameters for spectral embedding algorithm
Spectral embedding is a dimensionality reduction technique that uses the eigenvectors of the graph Laplacian to embed data points into a lower-dimensional space. This technique is particularly useful for non-linear dimensionality reduction and clustering tasks.
Fields
Spectral Embedding
preprocessing::spectral_embedding::transform
Perform spectral embedding on input dataset
This function computes the spectral embedding of the input dataset by:
- Constructing a k-nearest neighbors graph from the input data
- Computing the graph Laplacian (normalized or unnormalized)
- Finding the eigenvectors corresponding to the smallest eigenvalues
- Using these eigenvectors as the embedding coordinates
Parameters
Returns
void
Additional overload: preprocessing::spectral_embedding::transform
Perform spectral embedding using a precomputed connectivity graph
This function computes the spectral embedding from a precomputed sparse connectivity graph (e.g., from a k-NN search or custom similarity matrix). This is useful when you want to use a custom graph construction method or when you have a precomputed similarity/affinity matrix.
The function:
- Converts the COO matrix to the graph Laplacian
- Computes eigenvectors of the Laplacian
- Returns the eigenvectors as the embedding
Parameters
Returns
void