ECOCPAK v0.9
Defines | Enumerations | Functions | Variables
Ecoc_pak

Defines

#define ARMA_NO_DEBUG
#define ECOCPAK_PROGRAM

Enumerations

enum  { DECODING_MENU, CODING_MENU, CRITERION_MENU }

Functions

void exit_with_help (const char *str=0)
bool is_number (char *str)
void drawmenu_coding_method (int item)
void drawmenu_decoding_method (int item)
void drawmenu_criterion (int item)
void disclaimer ()
void parse_command_line (int argc, char **argv, char *input_file_name, char *testing_file_name, u32 &n_folds, bool &cross_validation_flag, int &classifiers_option, int &coding_strategy, int &decoding_strategy, int &size_threshold, double &improvement_threshold, double &performance_threshold, int &n_matrices, int &n_classifiers, int &criterion, double &validation, int &init_coding_strategy, u32 &maxiter, double &epsilon, int &ecoconemode, double &wvalidation, bool &verbose, imat &codmat)
void print_decoding_strategy (const int decoding_strategy, const bool verbose, ofstream &out)
void print_coding_strategy (const int coding_strategy, const bool verbose, ofstream &out)
int drawmenu (const u32 n_elem, const int option, const int init_value=0)
 Draws the NCurses menus for the decoding, coding and criterion selection.
int main (int argc, char **argv)

Variables

static char const spin_chars [] = "|/-\\"
bool menu_on = false

Define Documentation

#define ARMA_NO_DEBUG
#define ECOCPAK_PROGRAM

Enumeration Type Documentation

anonymous enum
Enumerator:
DECODING_MENU 
CODING_MENU 
CRITERION_MENU 

Function Documentation

void disclaimer ( )
  • NCurses function -- draws the disclaimer at program's beginning.
  • Input Arguments:
    • Void.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
int drawmenu ( const u32  n_elem,
const int  option,
const int  init_value = 0 
)

Draws the NCurses menus for the decoding, coding and criterion selection.

  • Input Arguments:
    • n_elem : Number of elements the menu will have.
    • option : What menu, choices are DECODING_MENU, CODING_MENU, CRITERION_MENU.
    • init_value : Initial highlighted value.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Returns the choice.
void drawmenu_coding_method ( int  item)
  • NCurses function -- draws the menu for training method (e.g., 1 VS 1, 1 VS ALL, DECOC).
  • Input Arguments:
    • item : Input item.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
void drawmenu_criterion ( int  item)
  • NCurses function -- draws the menu for criterion selection.
  • Input Arguments:
    • item : Input item.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
void drawmenu_decoding_method ( int  item)
  • NCurses function -- draws the menu for training method (e.g., 1 VS 1, 1 VS ALL, DECOC).
  • Input Arguments:
    • item : Input item.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
void exit_with_help ( const char *  str = 0)
  • Prints the programs help menu in case something went wrong.
  • Modified LIBSVM code.
  • Input Arguments:
    • str : Constant string, usually an error message.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
bool is_number ( char *  str)
  • Check whether input string is a number.
  • Input Arguments:
    • str : input string.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Boolean which is true if input string is a number and false otherwise.
int main ( int  argc,
char **  argv 
)
  • Main program function.
void parse_command_line ( int  argc,
char **  argv,
char *  input_file_name,
char *  testing_file_name,
u32 &  n_folds,
bool &  cross_validation_flag,
int &  classifiers_option,
int &  coding_strategy,
int &  decoding_strategy,
int &  size_threshold,
double &  improvement_threshold,
double &  performance_threshold,
int &  n_matrices,
int &  n_classifiers,
int &  criterion,
double &  validation,
int &  init_coding_strategy,
u32 &  maxiter,
double &  epsilon,
int &  ecoconemode,
double &  wvalidation,
bool &  verbose,
imat &  codmat 
)
  • Parses the command line arguments entered by user.
  • Modified LIBSVM code.
  • Input Arguments:
    • argc : Number of command line arguments.
    • argv : Array of command line arguments.
  • Output Arguments:
    • input_file_name : Input file name.
    • n_folds : Number of folds.
    • cross_validation_flag : Becomes true if user specified cross validation.
    • classifiers_option : Type of classifier.
    • coding_strategy : Coding strategy.
    • decoding_strategy : Decoding strategy.
    • size_threshold : Minimum cluster's size for subDECOC.
    • improvement_threshold : Improvement threshold for subDECOC.
    • performance_threshold : Performance threshold for subDECOC.
    • n_matrices : Number of valid matrices to examined in sparse or dense codings.
    • n_classifiers : Number of classifiers, columns of coding matrices in sparse or dense codings.
    • criterion : Criterion option for DECOC - subDECOC.
  • Return Argument:
    • Void.
void print_coding_strategy ( const int  coding_strategy,
const bool  verbose,
ofstream &  out 
)
  • Print type of decoding in experimental results
  • Input Arguments:
    • decoding_strategy : Decoding strategy.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.
void print_decoding_strategy ( const int  decoding_strategy,
const bool  verbose,
ofstream &  out 
)
  • Print type of decoding in experimental results
  • Input Arguments:
    • decoding_strategy : Decoding strategy.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Void.

Variable Documentation

bool menu_on = false
char const spin_chars[] = "|/-\\" [static]
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerator Defines