Functions
ML::PCA::opg Namespace Reference

Functions

void fit (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, float *components, float *explained_var, float *explained_var_ratio, float *singular_vals, float *mu, float *noise_vars, paramsPCAMG prms, bool verbose=false)
 performs MNMG fit operation for the pca More...
 
void fit (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< double > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, double *components, double *explained_var, double *explained_var_ratio, double *singular_vals, double *mu, double *noise_vars, paramsPCAMG prms, bool verbose=false)
 
void fit_transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::floatData_t **input, MLCommon::Matrix::floatData_t **trans_input, float *components, float *explained_var, float *explained_var_ratio, float *singular_vals, float *mu, float *noise_vars, paramsPCAMG prms, bool verbose)
 performs MNMG fit and transform operation for the pca More...
 
void fit_transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::doubleData_t **input, MLCommon::Matrix::doubleData_t **trans_input, double *components, double *explained_var, double *explained_var_ratio, double *singular_vals, double *mu, double *noise_vars, paramsPCAMG prms, bool verbose)
 
void transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::Data< float > **input, float *components, MLCommon::Matrix::Data< float > **trans_input, float *singular_vals, float *mu, paramsPCAMG prms, bool verbose)
 performs MNMG transform operation for the pca More...
 
void transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::Data< double > **input, double *components, MLCommon::Matrix::Data< double > **trans_input, double *singular_vals, double *mu, paramsPCAMG prms, bool verbose)
 
void inverse_transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::Data< float > **trans_input, float *components, MLCommon::Matrix::Data< float > **input, float *singular_vals, float *mu, paramsPCAMG prms, bool verbose)
 performs MNMG inverse transform operation for the pca More...
 
void inverse_transform (raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, std::uint32_t n_parts, MLCommon::Matrix::Data< double > **trans_input, double *components, MLCommon::Matrix::Data< double > **input, double *singular_vals, double *mu, paramsPCAMG prms, bool verbose)
 
void sign_flip (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, float *components, std::size_t n_components, cudaStream_t *streams, std::uint32_t n_stream)
 sign flip for PCA and tSVD. This is used to stabilize the sign of column major eigen vectors More...
 
void sign_flip (raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< double > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, double *components, std::size_t n_components, cudaStream_t *streams, std::uint32_t n_stream)
 

Function Documentation

◆ fit() [1/2]

void ML::PCA::opg::fit ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< double > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
double *  components,
double *  explained_var,
double *  explained_var_ratio,
double *  singular_vals,
double *  mu,
double *  noise_vars,
paramsPCAMG  prms,
bool  verbose = false 
)

◆ fit() [2/2]

void ML::PCA::opg::fit ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< float > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
float *  components,
float *  explained_var,
float *  explained_var_ratio,
float *  singular_vals,
float *  mu,
float *  noise_vars,
paramsPCAMG  prms,
bool  verbose = false 
)

performs MNMG fit operation for the pca

Parameters
[in]handlethe internal cuml handle object
[in]input_datainput data
[in]input_descdescriptor for input data
[out]componentsprincipal components of the input data
[out]explained_varexplained var
[out]explained_var_ratiothe explained var ratio
[out]singular_valssingular values of the data
[out]mumean of every column in input
[out]noise_varsvariance of the noise
[in]prmsdata structure that includes all the parameters from input size to algorithm
[in]verbose

◆ fit_transform() [1/2]

void ML::PCA::opg::fit_transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::doubleData_t **  input,
MLCommon::Matrix::doubleData_t **  trans_input,
double *  components,
double *  explained_var,
double *  explained_var_ratio,
double *  singular_vals,
double *  mu,
double *  noise_vars,
paramsPCAMG  prms,
bool  verbose 
)

◆ fit_transform() [2/2]

void ML::PCA::opg::fit_transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::floatData_t **  input,
MLCommon::Matrix::floatData_t **  trans_input,
float *  components,
float *  explained_var,
float *  explained_var_ratio,
float *  singular_vals,
float *  mu,
float *  noise_vars,
paramsPCAMG  prms,
bool  verbose 
)

performs MNMG fit and transform operation for the pca

Parameters
[in]handlethe internal cuml handle object
[in]rank_sizesincludes all the partition size information for the rank
[in]n_partsnumber of partitions
[in]inputinput data
[out]trans_inputtransformed input data
[out]componentsprincipal components of the input data
[out]explained_varexplained var
[out]explained_var_ratiothe explained var ratio
[out]singular_valssingular values of the data
[out]mumean of every column in input
[out]noise_varsvariance of the noise
[in]prmsdata structure that includes all the parameters from input size to algorithm
[in]verbose

◆ inverse_transform() [1/2]

void ML::PCA::opg::inverse_transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::Data< double > **  trans_input,
double *  components,
MLCommon::Matrix::Data< double > **  input,
double *  singular_vals,
double *  mu,
paramsPCAMG  prms,
bool  verbose 
)

◆ inverse_transform() [2/2]

void ML::PCA::opg::inverse_transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::Data< float > **  trans_input,
float *  components,
MLCommon::Matrix::Data< float > **  input,
float *  singular_vals,
float *  mu,
paramsPCAMG  prms,
bool  verbose 
)

performs MNMG inverse transform operation for the pca

Parameters
[in]handlethe internal cuml handle object
[in]rank_sizesincludes all the partition size information for the rank
[in]n_partsnumber of partitions
[in]trans_inputtransformed input data
[in]componentsprincipal components of the input data
[out]inputinput data
[in]singular_valssingular values of the data
[in]mumean of every column in input
[in]prmsdata structure that includes all the parameters from input size to algorithm
[in]verbose

◆ sign_flip() [1/2]

void ML::PCA::opg::sign_flip ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< double > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
double *  components,
std::size_t  n_components,
cudaStream_t *  streams,
std::uint32_t  n_stream 
)

◆ sign_flip() [2/2]

void ML::PCA::opg::sign_flip ( raft::handle_t &  handle,
std::vector< MLCommon::Matrix::Data< float > * > &  input_data,
MLCommon::Matrix::PartDescriptor &  input_desc,
float *  components,
std::size_t  n_components,
cudaStream_t *  streams,
std::uint32_t  n_stream 
)

sign flip for PCA and tSVD. This is used to stabilize the sign of column major eigen vectors

Parameters
[in]handlethe internal cuml handle object
[in]input_datainput matrix that will be used to determine the sign.
[in]input_descMNMG description of the input
[out]componentscomponents matrix.
[in]n_componentsnumber of columns of components matrix
[in]streamscuda streams
[in]n_streamnumber of streams

◆ transform() [1/2]

void ML::PCA::opg::transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::Data< double > **  input,
double *  components,
MLCommon::Matrix::Data< double > **  trans_input,
double *  singular_vals,
double *  mu,
paramsPCAMG  prms,
bool  verbose 
)

◆ transform() [2/2]

void ML::PCA::opg::transform ( raft::handle_t &  handle,
MLCommon::Matrix::RankSizePair **  rank_sizes,
std::uint32_t  n_parts,
MLCommon::Matrix::Data< float > **  input,
float *  components,
MLCommon::Matrix::Data< float > **  trans_input,
float *  singular_vals,
float *  mu,
paramsPCAMG  prms,
bool  verbose 
)

performs MNMG transform operation for the pca

Parameters
[in]handlethe internal cuml handle object
[in]rank_sizesincludes all the partition size information for the rank
[in]n_partsnumber of partitions
[in]inputinput data
[in]componentsprincipal components of the input data
[out]trans_inputtransformed input data
[in]singular_valssingular values of the data
[in]mumean of every column in input
[in]prmsdata structure that includes all the parameters from input size to algorithm
[in]verbose