ECOCPAK v0.9
Functions
Fn_forest_ecoc

Functions

imat ecocpak::permvec (const ivec &A)
 Creates permutation vectors of input binary vector.
void ecocpak::append_tree (const vector< ClassData > &classes_vector, const ivec &root, const int criterion_option, const int classifiers_type, imat &M, vector< Classifier * > &classifiers_vector)
 Appends tree structure to coding matrix M.
u32 ecocpak::forest_ecoc (const mat &training_samples, const icolvec &training_labels, const mat &testing_samples, const icolvec &testing_labels, const int decoding_strategy, const int classifiers_type, const int criterion_option, const u32 n_forests, const bool verbose, ofstream &verbose_output, double &elapsed_time)
 Forest ECOC training and testing procedure.
void append_tree (const vector< ClassData > &classes_vector, const ivec &root, const int criterion_option, const int classifiers_type, imat &M, vector< Classifier * > &classifiers_vector)
 Appends tree structure to coding matrix M.

Function Documentation

void ecocpak::append_tree ( const vector< ClassData > &  classes_vector,
const ivec &  root,
const int  criterion_option,
const int  classifiers_type,
imat &  M,
vector< Classifier * > &  classifiers_vector 
)

Appends tree structure to coding matrix M.

  • Input Arguments:
    • classes_vector : Vector of ClassData objects.
    • root : Vector with 1s and -1s that corresponds to the first column of tree's coding matrix.
    • criterion_option : Criterion option.
    • classifiers_type : Type of classifier in use.
  • Output Arguments:
    • M : New coding matrix.
    • classifiers_vector : New vector of classifiers.
  • Return Argument:
    • Void.
void append_tree ( const vector< ClassData > &  classes_vector,
const ivec &  root,
const int  criterion_option,
const int  classifiers_type,
imat &  M,
vector< Classifier * > &  classifiers_vector 
)

Appends tree structure to coding matrix M.

  • Input Arguments:
    • classes_vector : Vector of ClassData objects.
    • root : Vector with 1s and -1s that corresponds to the first column of tree's coding matrix.
    • criterion_option : Criterion option.
    • classifiers_type : Type of classifier in use.
  • Output Arguments:
    • M : New coding matrix.
    • classifiers_vector : New vector of classifiers.
  • Return Argument:
    • Void.
u32 ecocpak::forest_ecoc ( const mat &  training_samples,
const icolvec &  training_labels,
const mat &  testing_samples,
const icolvec &  testing_labels,
const int  decoding_strategy,
const int  classifiers_type,
const int  criterion_option,
const u32  n_forests,
const bool  verbose,
ofstream &  verbose_output,
double &  elapsed_time 
)

Forest ECOC training and testing procedure.

  • Input Arguments:
    • training_samples : A 2D input matrix where its rows represent the training sample vectors.
    • training_labels : The respective class labels of the training_samples input matrix.
    • testing_samples : A 2D input matrix where its rows represent the testing sample vectors.
    • testing_labels : The respective class labels of the testing_samples input matrix.
    • decoding_strategy : User's option specifying the type of decoding strategy that will be used.
    • classifiers_type : Type of classifier.
    • criterion_option : Criterion option (FQMI, FLDR or Custom).
    • n_matrices : Number of maximum created forests
  • Output Arguments:
    • coding_matrix : Coding matrix.
    • classifiers_vector : Vector of classifiers objects.
    • execution_time : Execution time.
  • Return Argument:
    • Number of misclassified test samples.
imat ecocpak::permvec ( const ivec &  A)

Creates permutation vectors of input binary vector.

  • Input Arguments:
    • A : Binary vector of 1s and -1s.
  • Output Arguments:
    • Void.
  • Return Argument:
    • A matrix with all the valid permutations of A.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerator Defines