ECOCPAK v0.9
Functions
Fn_sparse_random_ecoc

Functions

imat ecocpak::create_sparse_matrix_from_rand (const double *random_matrix, const u32 n_rows, const u32 n_cols)
bool ecocpak::identical_columns_sparse (const imat &coding_matrix)
imat ecocpak::create_sparse_random_matrix (const u32 n_classes, const u32 n_classifiers, const u32 n_matrices)
u32 ecocpak::sparse_random_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 u32 n_matrices, const u32 n_desired_classifiers, const bool verbose, ofstream &verbose_output, double &execution_time)

Function Documentation

imat ecocpak::create_sparse_matrix_from_rand ( const double *  random_matrix,
const u32  n_rows,
const u32  n_cols 
)
  • Creates sparse random ECOC matrix from a random real valued matrix with its elements in [0,1].
  • Input Arguments:
    • random_matrix : A pointer (i.e., address) to a random produced matrix.
    • n_rows : Number of input matrix rows.
    • n_cols : Number of input matrix columns.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Returns a sparse random coding matrix.
imat ecocpak::create_sparse_random_matrix ( const u32  n_classes,
const u32  n_classifiers,
const u32  n_matrices 
)
  • Creates sparse random ECOC coding matrix.
  • Input Arguments:
    • n_classes : Number of classes.
    • n_classifiers : Number of desired classifiers (i.e., number of coding matrix columns).
    • n_matrices : Number of valid dense random coding matrices to be produced.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Returns a valid sparse random coding matrix with integral elements.
bool ecocpak::identical_columns_sparse ( const imat &  coding_matrix)
  • Check wether input coding matrix has identical columns (i.e., the same problem is examined)
  • Input Arguments:
    • coding_matrix : Input coding matrix.
  • Output Arguments:
    • Void.
  • Return Argument:
    • Returns true if input coding matrix has identical columns, false otherwise.
u32 ecocpak::sparse_random_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 u32  n_matrices,
const u32  n_desired_classifiers,
const bool  verbose,
ofstream &  verbose_output,
double &  execution_time 
)
  • Error Correcting Output Codes with sparse random coding, training and testing procedure
  • Input Arguments:
    • training_samples : A 2D input matrix where its rows represent training sample vectors.
    • training_labels : The respective class labels of training_samples input matrix.
    • testing_samples : A 2D input matrix where its rows represents testing sample vectors.
    • testing_labels : The respective class labels of testing_samples input matrix.
    • decoding_strategy : User's option specifying the type of decoding methode that will be used.
    • classifiers_type : Type of classifier.
    • n_desired_classifiers : Number of desired classifiers (i.e., number of coding matrix columns).
    • n_matrices : Number of valid dense random coding matrices to be produced.
  • Output Arguments:
    • coding_matrix : Coding matrix.
    • classifiers_vector : Vector of classifiers objects.
    • execution_time : Execution time.
  • Return Arguments:
    • Number of misclassified test samples.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerator Defines