Functions
ML::GLM::opg Namespace Reference

Functions

void preProcessData (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< float > * > &labels, float *mu_input, float *mu_labels, float *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
 
void preProcessData (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< double > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< double > * > &labels, double *mu_input, double *mu_labels, double *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
 
void postProcessData (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< float > * > &labels, float *coef, float *intercept, float *mu_input, float *mu_labels, float *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
 
void postProcessData (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< double > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< double > * > &labels, double *coef, double *intercept, double *mu_input, double *mu_labels, double *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
 
template<typename T >
std::vector< T > getUniquelabelsMG (const raft::handle_t &handle, Matrix::PartDescriptor &input_desc, std::vector< Matrix::Data< T > * > &labels)
 Calculate unique class labels across multiple GPUs in a multi-node environment. More...
 
template<typename T >
void qnFit (raft::handle_t &handle, std::vector< Matrix::Data< T > * > &input_data, Matrix::PartDescriptor &input_desc, std::vector< Matrix::Data< T > * > &labels, T *coef, const qn_params &pams, bool X_col_major, bool standardization, int n_classes, T *f, int *num_iters)
 performs MNMG fit operation for the logistic regression using quasi newton methods More...
 
template<typename T , typename I >
void qnFitSparse (raft::handle_t &handle, std::vector< Matrix::Data< T > * > &input_values, I *input_cols, I *input_row_ids, I X_nnz, Matrix::PartDescriptor &input_desc, std::vector< Matrix::Data< T > * > &labels, T *coef, const qn_params &pams, bool standardization, int n_classes, T *f, int *num_iters)
 support sparse vectors (Compressed Sparse Row format) for MNMG logistic regression fit using quasi newton methods More...
 

Function Documentation

◆ getUniquelabelsMG()

template<typename T >
std::vector<T> ML::GLM::opg::getUniquelabelsMG ( const raft::handle_t &  handle,
Matrix::PartDescriptor &  input_desc,
std::vector< Matrix::Data< T > * > &  labels 
)

Calculate unique class labels across multiple GPUs in a multi-node environment.

Parameters
[in]handlethe internal cuml handle object
[in]input_descPartDescriptor object for the input
[in]labelslabels data
Returns
host vector that stores the distinct labels

◆ postProcessData() [1/2]

void ML::GLM::opg::postProcessData ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< double > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
std::vector< MLCommon::Matrix::Data< double > * > &  labels,
double *  coef,
double *  intercept,
double *  mu_input,
double *  mu_labels,
double *  norm2_input,
bool  fit_intercept,
bool  normalize,
cudaStream_t *  streams,
int  n_streams,
bool  verbose 
)

◆ postProcessData() [2/2]

void ML::GLM::opg::postProcessData ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< float > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
std::vector< MLCommon::Matrix::Data< float > * > &  labels,
float *  coef,
float *  intercept,
float *  mu_input,
float *  mu_labels,
float *  norm2_input,
bool  fit_intercept,
bool  normalize,
cudaStream_t *  streams,
int  n_streams,
bool  verbose 
)

◆ preProcessData() [1/2]

void ML::GLM::opg::preProcessData ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< double > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
std::vector< MLCommon::Matrix::Data< double > * > &  labels,
double *  mu_input,
double *  mu_labels,
double *  norm2_input,
bool  fit_intercept,
bool  normalize,
cudaStream_t *  streams,
int  n_streams,
bool  verbose 
)

◆ preProcessData() [2/2]

void ML::GLM::opg::preProcessData ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< float > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
std::vector< MLCommon::Matrix::Data< float > * > &  labels,
float *  mu_input,
float *  mu_labels,
float *  norm2_input,
bool  fit_intercept,
bool  normalize,
cudaStream_t *  streams,
int  n_streams,
bool  verbose 
)

◆ qnFit()

template<typename T >
void ML::GLM::opg::qnFit ( raft::handle_t &  handle,
std::vector< Matrix::Data< T > * > &  input_data,
Matrix::PartDescriptor &  input_desc,
std::vector< Matrix::Data< T > * > &  labels,
T *  coef,
const qn_params pams,
bool  X_col_major,
bool  standardization,
int  n_classes,
T *  f,
int *  num_iters 
)

performs MNMG fit operation for the logistic regression using quasi newton methods

Parameters
[in]handlethe internal cuml handle object
[in]input_datavector holding all partitions for that rank
[in]input_descPartDescriptor object for the input
[in]labelslabels data
[out]coeflearned coefficients
[in]pamsmodel parameters
[in]X_col_majortrue if X is stored column-major
[in]standardizationwhether to standardize the dataset before training
[in]n_classesnumber of outputs (number of classes or 1 for regression)
[out]fhost pointer holding the final objective value
[out]num_itershost pointer holding the actual number of iterations taken

◆ qnFitSparse()

template<typename T , typename I >
void ML::GLM::opg::qnFitSparse ( raft::handle_t &  handle,
std::vector< Matrix::Data< T > * > &  input_values,
I *  input_cols,
I *  input_row_ids,
X_nnz,
Matrix::PartDescriptor &  input_desc,
std::vector< Matrix::Data< T > * > &  labels,
T *  coef,
const qn_params pams,
bool  standardization,
int  n_classes,
T *  f,
int *  num_iters 
)

support sparse vectors (Compressed Sparse Row format) for MNMG logistic regression fit using quasi newton methods

Parameters
[in]handlethe internal cuml handle object
[in]input_valuesvector holding non-zero values of all partitions for that rank
[in]input_colsvector holding column indices of non-zero values of all partitions for that rank
[in]input_row_idsvector holding row pointers of non-zero values of all partitions for that rank
[in]X_nnzthe number of non-zero values of that rank
[in]standardizationwhether to standardize the dataset before training
[in]input_descPartDescriptor object for the input
[in]labelslabels data
[out]coeflearned coefficients
[in]pamsmodel parameters
[in]n_classesnumber of outputs (number of classes or 1 for regression)
[out]fhost pointer holding the final objective value
[out]num_itershost pointer holding the actual number of iterations taken