-
Notifications
You must be signed in to change notification settings - Fork 568
Spectral Embedding #6581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: branch-25.06
Are you sure you want to change the base?
Spectral Embedding #6581
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
// // if (idx < size) { vec[idx] = (fabs(vec[idx]) < threshold) ? 0 : vec[idx]; } | ||
// } | ||
|
||
void scale_eigenvectors_by_diagonal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pull these primitives into RAFT. We centralize these primitives specifically to 1) reduce code duplication, and 2) highlight areas that could be further optimized in the future- optimizations of these types of computations propagate to all algorithms which use them. Having them buried in each algorithm reduces the maintainability as well as the benefits from continued optimization.
} | ||
}; | ||
|
||
auto spectral_embedding(raft::resources const& handle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a preprocessing method in cuVS c++ API (since it's nearest neighbors + laplacian + eigendecomp). It should be exposed in cuML. We should also be allowing other options for the nearest neighbors than just brute-force.
// raft::print_device_vector("sym_coo1.cols", sym_coo1.cols(), sym_coo1.nnz, std::cout); | ||
// raft::print_device_vector("sym_coo1.vals", sym_coo1.vals(), sym_coo1.nnz, std::cout); | ||
|
||
raft::sparse::COO<float> sym_coo(stream); // Don't pre-allocate dimensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note for future use as we definitely want to make sure we are using the new raft sparse types (raft::sparse::device_coo_matrix
) in public APIs (this is not a public API). We are trying to get rid of the legacy types (raft::sparse::COO
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments in review
Resolves #6486
Usage