注意
RAFT 中的向量搜索和聚类算法正在迁移到一个专门用于向量搜索的新库,名为 cuVS。在此迁移过程中,我们将继续支持 RAFT 中的向量搜索算法,但在 RAPIDS 24.06 (六月) 版本发布后将不再更新它们。我们计划在 RAPIDS 24.10 (十月) 版本完成迁移,并在 24.12 (十二月) 版本中将这些算法从 RAFT 中完全移除。
多变量随机抽样#
多变量高斯#
#include <raft/random/multi_variable_gaussian.hpp>
namespace raft::random
-
enum class multi_variable_gaussian_decomposition_method#
multi_variable_gaussian 使用的矩阵分解方法。
multi_variable_gaussian
可以使用以下任何方法。CHOLESKY
:对范数方程使用 Cholesky 分解。这种方法可能比其他两种方法更快,但精度较低。JACOBI
:使用 cuSOLVER 的 gesvdj 算法计算奇异值分解 (SVD),该算法基于 Jacobi 方法(平面旋转扫描)。对于中小型矩阵,这比下面的 QR 选项能更好地暴露并行性。QR
:使用 cuSOLVER 的 gesvd 算法计算奇异值分解 (SVD),该算法基于 QR 算法。
值
-
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)#