Functions | |
void | knn (raft::handle_t &handle, std::vector< Matrix::Data< int64_t > * > *out_I, std::vector< Matrix::floatData_t * > *out_D, std::vector< Matrix::floatData_t * > &idx_data, Matrix::PartDescriptor &idx_desc, std::vector< Matrix::floatData_t * > &query_data, Matrix::PartDescriptor &query_desc, bool rowMajorIndex, bool rowMajorQuery, int k, size_t batch_size, bool verbose) |
void | knn_classify (raft::handle_t &handle, std::vector< Matrix::Data< int > * > *out, std::vector< std::vector< float * >> *probas, std::vector< Matrix::floatData_t * > &idx_data, Matrix::PartDescriptor &idx_desc, std::vector< Matrix::floatData_t * > &query_data, Matrix::PartDescriptor &query_desc, std::vector< std::vector< int * >> &y, std::vector< int * > &uniq_labels, std::vector< int > &n_unique, bool rowMajorIndex=false, bool rowMajorQuery=false, bool probas_only=false, int k=10, size_t batch_size=1<< 15, bool verbose=false) |
void | knn_regress (raft::handle_t &handle, std::vector< Matrix::Data< float > * > *out, std::vector< Matrix::floatData_t * > &idx_data, Matrix::PartDescriptor &idx_desc, std::vector< Matrix::floatData_t * > &query_data, Matrix::PartDescriptor &query_desc, std::vector< std::vector< float * >> &y, bool rowMajorIndex, bool rowMajorQuery, int k, int n_outputs, size_t batch_size, bool verbose) |
void ML::KNN::opg::knn | ( | raft::handle_t & | handle, |
std::vector< Matrix::Data< int64_t > * > * | out_I, | ||
std::vector< Matrix::floatData_t * > * | out_D, | ||
std::vector< Matrix::floatData_t * > & | idx_data, | ||
Matrix::PartDescriptor & | idx_desc, | ||
std::vector< Matrix::floatData_t * > & | query_data, | ||
Matrix::PartDescriptor & | query_desc, | ||
bool | rowMajorIndex, | ||
bool | rowMajorQuery, | ||
int | k, | ||
size_t | batch_size, | ||
bool | verbose | ||
) |
Performs a multi-node multi-GPU KNN.
[in] | handle | the raft::handle_t to use for managing resources |
[out] | out_I | vector of output index partitions. size should match the number of local input partitions. |
[out] | out_D | vector of output distance partitions. size should match the number of local input partitions. |
[in] | idx_data | vector of local indices to query |
[in] | idx_desc | describes how the index partitions are distributed across the ranks. |
[in] | query_data | vector of local query partitions |
[in] | query_desc | describes how the query partitions are distributed across the cluster. |
[in] | rowMajorIndex | boolean indicating whether the index is row major. |
[in] | rowMajorQuery | boolean indicating whether the query is row major. |
[in] | k | the number of neighbors to query |
[in] | batch_size | the max number of rows to broadcast at a time |
[in] | verbose | print extra logging info |
void ML::KNN::opg::knn_classify | ( | raft::handle_t & | handle, |
std::vector< Matrix::Data< int > * > * | out, | ||
std::vector< std::vector< float * >> * | probas, | ||
std::vector< Matrix::floatData_t * > & | idx_data, | ||
Matrix::PartDescriptor & | idx_desc, | ||
std::vector< Matrix::floatData_t * > & | query_data, | ||
Matrix::PartDescriptor & | query_desc, | ||
std::vector< std::vector< int * >> & | y, | ||
std::vector< int * > & | uniq_labels, | ||
std::vector< int > & | n_unique, | ||
bool | rowMajorIndex = false , |
||
bool | rowMajorQuery = false , |
||
bool | probas_only = false , |
||
int | k = 10 , |
||
size_t | batch_size = 1<< 15 , |
||
bool | verbose = false |
||
) |
Performs a multi-node multi-GPU KNN classify.
[in] | handle | the raft::handle_t to use for managing resources |
[out] | out | vector of output labels partitions. size should match the number of local input partitions. |
[in] | probas | (optional) pointer to a vector containing arrays of probabilities |
[in] | idx_data | vector of local indices to query |
[in] | idx_desc | describes how the index partitions are distributed across the ranks. |
[in] | query_data | vector of local query partitions |
[in] | query_desc | describes how the query partitions are distributed across the cluster. |
[in] | y | vector of vector of label arrays. for multilabel classification, each element in the vector is a different "output" array of labels corresponding to the i'th output. size should match the number of local input partitions. |
[in] | uniq_labels | vector of the sorted unique labels for each array in y |
[in] | n_unique | vector of sizes for each array in uniq_labels |
[in] | rowMajorIndex | boolean indicating whether the index is row major. |
[in] | rowMajorQuery | boolean indicating whether the query is row major. |
[in] | probas_only | return probas instead of performing complete knn_classify |
[in] | k | the number of neighbors to query |
[in] | batch_size | the max number of rows to broadcast at a time |
[in] | verbose | print extra logging info |
void ML::KNN::opg::knn_regress | ( | raft::handle_t & | handle, |
std::vector< Matrix::Data< float > * > * | out, | ||
std::vector< Matrix::floatData_t * > & | idx_data, | ||
Matrix::PartDescriptor & | idx_desc, | ||
std::vector< Matrix::floatData_t * > & | query_data, | ||
Matrix::PartDescriptor & | query_desc, | ||
std::vector< std::vector< float * >> & | y, | ||
bool | rowMajorIndex, | ||
bool | rowMajorQuery, | ||
int | k, | ||
int | n_outputs, | ||
size_t | batch_size, | ||
bool | verbose | ||
) |
Performs a multi-node multi-GPU KNN regress.
[in] | handle | the raft::handle_t to use for managing resources |
[out] | out | vector of output partitions. size should match the number of local input partitions. |
[in] | idx_data | vector of local indices to query |
[in] | idx_desc | describes how the index partitions are distributed across the ranks. |
[in] | query_data | vector of local query partitions |
[in] | query_desc | describes how the query partitions are distributed across the cluster. |
[in] | y | vector of vector of output arrays. for multi-output regression, each element in the vector is a different "output" array corresponding to the i'th output. size should match the number of local input partitions. |
[in] | rowMajorIndex | boolean indicating whether the index is row major. |
[in] | rowMajorQuery | boolean indicating whether the query is row major. |
[in] | k | the number of neighbors to query |
[in] | n_outputs | number of outputs |
[in] | batch_size | the max number of rows to broadcast at a time |
[in] | verbose | print extra logging info |