ECOCPAK v0.9
Functions
Fn_sffs

Functions

double ecocpak::criterion_fqmi (const vector< ClassData > &classes_vector, const ucolvec &indexPtr, const u32 curSubsetSize, const double sigma)
double ecocpak::criterion_fldr (const vector< ClassData > &classes_vector, const ucolvec &indexPtr, const u32 curSubsetSize)
double ecocpak::criterion (const vector< ClassData > &class_vector, const ucolvec &indexPtr, const u32 curSubSetSize, const u32 criterion_option, const double sigma)
ucolvec ecocpak::sffs (const vector< ClassData > &classes_vector, const u32 crit)
double criterion_fqmi (const vector< ClassData > &classes_vector, const ucolvec &indexPtr, const u32 curSubsetSize, const double sigma)
double criterion_fldr (const vector< ClassData > &classes_vector, const ucolvec &indexPtr, const u32 curSubsetSize)
double criterion (const vector< ClassData > &class_vector, const ucolvec &indexPtr, const u32 curSubSetSize, const u32 criterion_option, const double sigma)
ucolvec sffs (const vector< ClassData > &classes_vector, const u32 crit)

Function Documentation

double ecocpak::criterion ( const vector< ClassData > &  class_vector,
const ucolvec &  indexPtr,
const u32  curSubSetSize,
const u32  criterion_option,
const double  sigma 
)
  • Criterion evaluation function for sffs() function.
  • Input Arguments:
    • class_vector : Vector of classes.
    • indexPtr : Current set bin.
    • curSubSetSize : First position of indexPtr that represent current best subset.
    • criterion_option : Evaluation criterion.
    • sigma : Parameter used in the fqmi computation.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Criterion value
double criterion ( const vector< ClassData > &  class_vector,
const ucolvec &  indexPtr,
const u32  curSubSetSize,
const u32  criterion_option,
const double  sigma 
)
  • Criterion evaluation function for sffs() function.
  • Input Arguments:
    • class_vector : Vector of classes.
    • indexPtr : Current set bin.
    • curSubSetSize : First position of indexPtr that represent current best subset.
    • criterion_option : Evaluation criterion.
    • sigma : Parameter used in the fqmi computation.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Criterion value
double ecocpak::criterion_fldr ( const vector< ClassData > &  classes_vector,
const ucolvec &  indexPtr,
const u32  curSubsetSize 
)
  • Fisher discriminant as a criterion function for SFFS algorithm.
  • Criterion function for SFFS algorithm.
  • Actually interface function for fldr().
  • Input arguments:
    • classes_vector : Vector with classes.
    • indexPtr : Array of labels.
    • curSubSetSize : Current set's size.
  • Output argument:
    • Scalar which denotes criterion value.
double criterion_fldr ( const vector< ClassData > &  classes_vector,
const ucolvec &  indexPtr,
const u32  curSubsetSize 
)
  • Fisher discriminant as a criterion function for SFFS algorithm.
  • Criterion function for SFFS algorithm.
  • Actually interface function for fldr().
  • Input arguments:
    • classes_vector : Vector with classes.
    • indexPtr : Array of labels.
    • curSubSetSize : Current set's size.
  • Output argument:
    • Scalar which denotes criterion value.
double criterion_fqmi ( const vector< ClassData > &  classes_vector,
const ucolvec &  indexPtr,
const u32  curSubsetSize,
const double  sigma 
)
  • Fast Quadratic Mutual Information between classes and their respective labels.
  • Criterion function for SFFS algorithm.
  • Standard Criterion.
  • Actually interface function for fqmi().
  • Input Arguments:
    • classes_vector : Vector with classes.
    • indexPtr : Array of labels.
    • curSubSetSize : Current set's size.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Scalar which denotes criterion value.
double ecocpak::criterion_fqmi ( const vector< ClassData > &  classes_vector,
const ucolvec &  indexPtr,
const u32  curSubsetSize,
const double  sigma 
)
  • Fast Quadratic Mutual Information between classes and their respective labels.
  • Criterion function for SFFS algorithm.
  • Standard Criterion.
  • Actually interface function for fqmi().
  • Input Arguments:
    • classes_vector : Vector with classes.
    • indexPtr : Array of labels.
    • curSubSetSize : Current set's size.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Scalar which denotes criterion value.
ucolvec sffs ( const vector< ClassData > &  classes_vector,
const u32  crit 
)
  • This is a C++ listing of Classical Forward Floating Search Method. The original code was taken from Feature Selection Toolbox package programmed by Petr Somol, which was mainly written in C style and transformed in C++ style by Nikolaos Arvanitopoulos and Dimitrios Bouzas.
  • To use the code you would probably have to rewrite/modify following parts:
    • criterion procedure "criterion()" should be replaced by calling of your criterion function, together with possible parameter passing.
  • meaning of constants and some identifiers you may need to set for calling the procedure (local variables are described inside the procedure):
    • int n - full feature set size
    • int d - desired feature subset size
    • int delta - floating search stopping constraint
      • delta = 0 : full search (the procedure will not stop after reaching dimension d; SFFS will reach n, SFBS will reach 0).
      • delta > 0 : SFFS will float until dimension d+delta is reached, SFBS will float until d-delta is reached.
      • delta = 1 : The value of delta limit is computed during the course of the algorithm by averaging the length of backtracking.
      • delta = 2 : The value of delta limit is set during the course of the algorithm as the maximum length of backtracking.
    • int detail : textual output detail level (use NOTHING=0 or STANDARD=2).
  • A non-redundand coding of subset configurations is used. For easier understanding imagine our goal is to find a subset by exhaustive search, when d = 5 and n = 12.
  • Initial configuration is 111110000000 (actually stored in "bin" field).
  • In every step:
    • find the leftmost block of 1's.
    • shift its rightmost 1 to the right.
    • shift the rest of this block to the left boundary (if it is not there).
  • This algorithm generates increasingly all binary representations of subsets.
  • In context of floating search this algorithm is used for computation of generalized steps (in case of simple SFFS and simple SFBS only single-feature configurations are tested).
  • For purposes of floating search more identifiers than 0 and 1 are used to identify temporarily freezed features etc. (2,-1).
  • Because of possibility to exchange meanings of 0 and 1 it was suitable to incorporate both forward and backward versions of floating search into one procedure.
  • Input Arguments:
    • classes_vector : Vector of data classes.
    • crit : Criterion option.
  • Output Arguments:
    • Void.
  • Output Argument:
    • Vector of best subset's class indices.
ucolvec ecocpak::sffs ( const vector< ClassData > &  classes_vector,
const u32  crit 
)
  • This is a C++ listing of Classical Forward Floating Search Method. The original code was taken from Feature Selection Toolbox package programmed by Petr Somol, which was mainly written in C style and transformed in C++ style by Nikolaos Arvanitopoulos and Dimitrios Bouzas.
  • To use the code you would probably have to rewrite/modify following parts:
    • criterion procedure "criterion()" should be replaced by calling of your criterion function, together with possible parameter passing.
  • meaning of constants and some identifiers you may need to set for calling the procedure (local variables are described inside the procedure):
    • int n - full feature set size
    • int d - desired feature subset size
    • int delta - floating search stopping constraint
      • delta = 0 : full search (the procedure will not stop after reaching dimension d; SFFS will reach n, SFBS will reach 0).
      • delta > 0 : SFFS will float until dimension d+delta is reached, SFBS will float until d-delta is reached.
      • delta = 1 : The value of delta limit is computed during the course of the algorithm by averaging the length of backtracking.
      • delta = 2 : The value of delta limit is set during the course of the algorithm as the maximum length of backtracking.
    • int detail : textual output detail level (use NOTHING=0 or STANDARD=2).
  • A non-redundand coding of subset configurations is used. For easier understanding imagine our goal is to find a subset by exhaustive search, when d = 5 and n = 12.
  • Initial configuration is 111110000000 (actually stored in "bin" field).
  • In every step:
    • find the leftmost block of 1's.
    • shift its rightmost 1 to the right.
    • shift the rest of this block to the left boundary (if it is not there).
  • This algorithm generates increasingly all binary representations of subsets.
  • In context of floating search this algorithm is used for computation of generalized steps (in case of simple SFFS and simple SFBS only single-feature configurations are tested).
  • For purposes of floating search more identifiers than 0 and 1 are used to identify temporarily freezed features etc. (2,-1).
  • Because of possibility to exchange meanings of 0 and 1 it was suitable to incorporate both forward and backward versions of floating search into one procedure.
  • Input Arguments:
    • classes_vector : Vector of data classes.
    • crit : Criterion option.
  • Output Arguments:
    • Void.
  • Output Argument:
    • Vector of best subset's class indices.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerator Defines