Attention

The vector search and clustering algorithms in RAFT are being migrated to a new library dedicated to vector search called cuVS. We will continue to support the vector search algorithms in RAFT during this move, but will no longer update them after the RAPIDS 24.06 (June) release. We plan to complete the migration by RAPIDS 24.08 (August) release.

Multi-Variable Random Sampling#

Multi-Variable Gaussian#

#include <raft/random/multi_variable_gaussian.hpp>

namespace raft::random

enum class multi_variable_gaussian_decomposition_method#

Matrix decomposition method for multi_variable_gaussian to use.

multi_variable_gaussian can use any of the following methods.

  • CHOLESKY: Uses Cholesky decomposition on the normal equations. This may be faster than the other two methods, but less accurate.

  • JACOBI: Uses the singular value decomposition (SVD) computed with cuSOLVER’s gesvdj algorithm, which is based on the Jacobi method (sweeps of plane rotations). This exposes more parallelism for small and medium size matrices than the QR option below.

  • QR: Uses the SVD computed with cuSOLVER’s gesvd algorithm, which is based on the QR algorithm.

Values:

enumerator CHOLESKY#
enumerator JACOBI#
enumerator QR#
template<typename ValueType>
void multi_variable_gaussian(raft::resources const &handle, rmm::device_async_resource_ref mem_resource, std::optional<raft::device_vector_view<const ValueType, int>> x, raft::device_matrix_view<ValueType, int, raft::col_major> P, raft::device_matrix_view<ValueType, int, raft::col_major> X, const multi_variable_gaussian_decomposition_method method)#
template<typename ValueType>
void multi_variable_gaussian(raft::resources const &handle, std::optional<raft::device_vector_view<const ValueType, int>> x, raft::device_matrix_view<ValueType, int, raft::col_major> P, raft::device_matrix_view<ValueType, int, raft::col_major> X, const multi_variable_gaussian_decomposition_method method)#