planc
Parallel Lowrank Approximation with Non-negativity Constraints
Public Member Functions | List of all members
planc::ParseCommandLine Class Reference

#include <parsecommandline.hpp>

Public Member Functions

 ParseCommandLine (int argc, char **argv)
 Constructor that takes the number of arguments and the command line parameters. More...
 
void parseplancopts ()
 parses the command line parameters More...
 
void printConfig ()
 print the configuration received through the command line paramters More...
 
void print_usage ()
 
UWORD lowrankk ()
 returns the low rank. Passed as parameter –lowrank or -k More...
 
UWORD globalm ()
 return global rows. Passed as parameter -d More...
 
UWORD globaln ()
 
FVEC regW ()
 L2 regularization as the first parameter and L1 as second for left lowrank factor W. More...
 
FVEC regH ()
 L2 regularization as the first parameter and L1 as second for right lowrank factor H. More...
 
algotype lucalgo ()
 Returns the NMF algorithm to run. Passed as parameter –algo or -a. More...
 
UVEC processor_grids ()
 Returns the process grid configuration. More...
 
FVEC regularizers ()
 Returns the vector regularizers for all the modes. More...
 
UVEC dimensions ()
 Returns vector of dimensions for every mode. More...
 
int num_k_blocks ()
 
int iterations ()
 Returns number of iterations. passed as -t or –iter. More...
 
float sparsity ()
 Input parameter for generating sparse matrix. Passed as -s or –sparsity. More...
 
std::string input_file_name ()
 Returns input file name. Passed as -i or –input. More...
 
std::string output_file_name ()
 Returns output file name. More...
 
int pr ()
 Returns the number of processor rows. More...
 
int pc ()
 
Returns the number of processor columns. More...
 
int num_modes ()
 Returns number of modes in tensors. For matrix it is two. More...
 
bool dim_tree ()
 Enable dimension tree or not. More...
 
bool compute_error ()
 Returns whether to compute error not. Passed as parameter -e or –error. More...
 
normtype input_normalization ()
 To column normalize the input matrix. More...
 

Detailed Description

Definition at line 14 of file parsecommandline.hpp.

Constructor & Destructor Documentation

◆ ParseCommandLine()

planc::ParseCommandLine::ParseCommandLine ( int  argc,
char **  argv 
)
inline

Constructor that takes the number of arguments and the command line parameters.

Parameters
[in]argc- number of arguments
[in]**argv- command line parameters.

Definition at line 92 of file parsecommandline.hpp.

Member Function Documentation

◆ compute_error()

bool planc::ParseCommandLine::compute_error ( )
inline

Returns whether to compute error not. Passed as parameter -e or –error.

Definition at line 295 of file parsecommandline.hpp.

◆ dim_tree()

bool planc::ParseCommandLine::dim_tree ( )
inline

Enable dimension tree or not.

By default we use dimension trees for more than three modes. Passed as parameter –dimtree 1

Definition at line 293 of file parsecommandline.hpp.

◆ dimensions()

UVEC planc::ParseCommandLine::dimensions ( )
inline

Returns vector of dimensions for every mode.

Passed as parameter -d or –dimensions

Definition at line 264 of file parsecommandline.hpp.

◆ globalm()

UWORD planc::ParseCommandLine::globalm ( )
inline

return global rows. Passed as parameter -d

Definition at line 230 of file parsecommandline.hpp.

◆ globaln()

UWORD planc::ParseCommandLine::globaln ( )
inline

Definition at line 232 of file parsecommandline.hpp.

◆ input_file_name()

std::string planc::ParseCommandLine::input_file_name ( )
inline

Returns input file name. Passed as -i or –input.

Definition at line 271 of file parsecommandline.hpp.

◆ input_normalization()

normtype planc::ParseCommandLine::input_normalization ( )
inline

To column normalize the input matrix.

Definition at line 297 of file parsecommandline.hpp.

◆ iterations()

int planc::ParseCommandLine::iterations ( )
inline

Returns number of iterations. passed as -t or –iter.

Definition at line 267 of file parsecommandline.hpp.

◆ lowrankk()

UWORD planc::ParseCommandLine::lowrankk ( )
inline

returns the low rank. Passed as parameter –lowrank or -k

Definition at line 228 of file parsecommandline.hpp.

◆ lucalgo()

algotype planc::ParseCommandLine::lucalgo ( )
inline

Returns the NMF algorithm to run. Passed as parameter –algo or -a.

Definition at line 246 of file parsecommandline.hpp.

◆ num_k_blocks()

int planc::ParseCommandLine::num_k_blocks ( )
inline

Definition at line 265 of file parsecommandline.hpp.

◆ num_modes()

int planc::ParseCommandLine::num_modes ( )
inline

Returns number of modes in tensors. For matrix it is two.

Definition at line 288 of file parsecommandline.hpp.

◆ output_file_name()

std::string planc::ParseCommandLine::output_file_name ( )
inline

Returns output file name.

Passed as -o or –output. Every mode will appended as _mode.

Definition at line 276 of file parsecommandline.hpp.

◆ parseplancopts()

void planc::ParseCommandLine::parseplancopts ( )
inline

parses the command line parameters

Definition at line 107 of file parsecommandline.hpp.

◆ pc()

int planc::ParseCommandLine::pc ( )
inline


Returns the number of processor columns.

Used for distributed NMF. The second parameter of -p.

Definition at line 286 of file parsecommandline.hpp.

◆ pr()

int planc::ParseCommandLine::pr ( )
inline

Returns the number of processor rows.

Used for distributed NMF. The first parameter of -p.

Definition at line 281 of file parsecommandline.hpp.

◆ print_usage()

void planc::ParseCommandLine::print_usage ( )
inline

Definition at line 197 of file parsecommandline.hpp.

◆ printConfig()

void planc::ParseCommandLine::printConfig ( )
inline

print the configuration received through the command line paramters

Definition at line 180 of file parsecommandline.hpp.

◆ processor_grids()

UVEC planc::ParseCommandLine::processor_grids ( )
inline

Returns the process grid configuration.

Passed as parameter –processors or -p

Definition at line 252 of file parsecommandline.hpp.

◆ regH()

FVEC planc::ParseCommandLine::regH ( )
inline

L2 regularization as the first parameter and L1 as second for right lowrank factor H.

Passed as parameter –regularizer with pair of values in double quotes for W and H "l2W l1W l2H l1H"

Definition at line 244 of file parsecommandline.hpp.

◆ regularizers()

FVEC planc::ParseCommandLine::regularizers ( )
inline

Returns the vector regularizers for all the modes.

It will 2 times the mode values. The first entry is L2 regularization and second value is L1 for every mode. Passed as parameter –regularizers "L2 L1" for every mode.

Definition at line 259 of file parsecommandline.hpp.

◆ regW()

FVEC planc::ParseCommandLine::regW ( )
inline

L2 regularization as the first parameter and L1 as second for left lowrank factor W.

Passed as parameter –regularizer with pair of values in double quotes for W and H "l2W l1W l2H l1H"

Definition at line 238 of file parsecommandline.hpp.

◆ sparsity()

float planc::ParseCommandLine::sparsity ( )
inline

Input parameter for generating sparse matrix. Passed as -s or –sparsity.

Definition at line 269 of file parsecommandline.hpp.


The documentation for this class was generated from the following file: