spectral_embedding.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2025, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <raft/core/device_mdspan.hpp>
18 #include <raft/core/resources.hpp>
19 
21 
22 struct params;
23 
24 } // end namespace cuvs::preprocessing::spectral_embedding
25 
27 
31 struct params {
34 
37 
40 
42  bool drop_first;
43 
45  uint64_t seed;
46 };
47 
48 cuvs::preprocessing::spectral_embedding::params to_cuvs(ML::SpectralEmbedding::params& config);
49 
50 void transform(raft::resources const& handle,
52  raft::device_matrix_view<float, int, raft::row_major> dataset,
53  raft::device_matrix_view<float, int, raft::col_major> embedding);
54 
55 } // namespace ML::SpectralEmbedding
Definition: spectral_embedding.hpp:26
cuvs::preprocessing::spectral_embedding::params to_cuvs(ML::SpectralEmbedding::params &config)
void transform(raft::resources const &handle, ML::SpectralEmbedding::params config, raft::device_matrix_view< float, int, raft::row_major > dataset, raft::device_matrix_view< float, int, raft::col_major > embedding)
Definition: spectral_embedding.hpp:20
Parameters for spectral embedding algorithm.
Definition: spectral_embedding.hpp:31
bool norm_laplacian
Whether to normalize the Laplacian matrix.
Definition: spectral_embedding.hpp:39
int n_neighbors
The number of neighbors to use for the nearest neighbors graph.
Definition: spectral_embedding.hpp:36
bool drop_first
Whether to drop the first eigenvector.
Definition: spectral_embedding.hpp:42
int n_components
The number of components to reduce the data to.
Definition: spectral_embedding.hpp:33
uint64_t seed
Random seed for reproducibility.
Definition: spectral_embedding.hpp:45