Functions | |
| void | fit_embedding (const raft::handle_t &handle, int *rows, int *cols, float *vals, int nnz, int n, int n_components, float *out, unsigned long long seed=1234567) |
| void ML::Spectral::fit_embedding | ( | const raft::handle_t & | handle, |
| int * | rows, | ||
| int * | cols, | ||
| float * | vals, | ||
| int | nnz, | ||
| int | n, | ||
| int | n_components, | ||
| float * | out, | ||
| unsigned long long | seed = 1234567 |
||
| ) |
Given a COO formatted (symmetric) knn graph, this function computes the spectral embeddings (lowest n_components eigenvectors), using Lanczos min cut algorithm.
| handle | cuml handle |
| rows | source vertices of knn graph (size nnz) |
| cols | destination vertices of knn graph (size nnz) |
| vals | edge weights connecting vertices of knn graph (size nnz) |
| nnz | size of rows/cols/vals |
| n | number of samples in X |
| n_components | the number of components to project the X into |
| out | output array for embedding (size n*n_comonents) |
| seed | random seed to use in both the lanczos solver and k-means |