ECOCPAK v0.9
Functions
Fn_crossvalidation

Functions

double ecocpak::cross_validation (const mat &samples, const icolvec &labels, const imat &codmat, const Threshold &thres, const u32 n_folds, const u32 n_classes, const u32 criterion_option, const u32 classifier_option, const int coding_strategy, const int decoding_strategy, const u32 n_matrices, const u32 n_desired_classifers, const double validation, const int init_coding_strategy, const int ecocone_mode, const u32 max_iter, const double epsilon, const double wvalidation, const bool verbose, double &mean_rows, double &mean_cols, double &elapsed_time, ofstream &output)
double ecocpak::cvonesvsone (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvonesvsall (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvdecoc (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 criterion_option, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvsubdecoc (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 criterion_option, const Threshold &thres, const bool verbose, double &mr, double &mc, double &elapsed_time, ofstream &output)
double ecocpak::cvsparserand (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 n_matrices, const u32 n_desired_classifers, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvdenserand (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 n_matrices, const u32 n_desired_classifers, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvecocone (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const double validation, const int init_coding_strategy, const int ecocone_mode, const u32 max_iter, const double epsilon, const double wvalidation, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvforest (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 n_trees, const bool verbose, double &elapsed_time, ofstream &output)
double ecocpak::cvcustom (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const imat &codmat, const bool verbose, double &elapsed_time, ofstream &output)
double cross_validation (const mat &samples, const icolvec &labels, const imat &codmat, const Threshold &thres, const u32 n_folds, const u32 n_classes, const u32 criterion_option, const u32 classifier_option, const int coding_strategy, const int decoding_strategy, const u32 n_matrices, const u32 n_desired_classifers, const double validation, const int init_coding_strategy, const int ecocone_mode, const u32 max_iter, const double epsilon, const double wvalidation, const bool verbose, double &mean_rows, double &mean_cols, double &elapsed_time, ofstream &output)
double cvsubdecoc (const mat &samples, const icolvec &labels, const u32 n_folds, const u32 n_classes, const u32 classifier_option, const int decoding_strategy, const u32 criterion_option, const Threshold &thres, const bool verbose, double &mr, double &mc, double &elapsed_time, ofstream &output)

Function Documentation

double ecocpak::cross_validation ( const mat &  samples,
const icolvec &  labels,
const imat &  codmat,
const Threshold thres,
const u32  n_folds,
const u32  n_classes,
const u32  criterion_option,
const u32  classifier_option,
const int  coding_strategy,
const int  decoding_strategy,
const u32  n_matrices,
const u32  n_desired_classifers,
const double  validation,
const int  init_coding_strategy,
const int  ecocone_mode,
const u32  max_iter,
const double  epsilon,
const double  wvalidation,
const bool  verbose,
double &  mean_rows,
double &  mean_cols,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure.
  • Modified LIBSVM code.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Sample labels.
    • codmat : Custom coding matrix.
    • thres : Threshold object.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • criterion_option : Entered criterion option by user.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • n_matrices : Number of random matrices to select from.
    • n_desired_classifiers : Number of columns in the coding matrix.
    • validation : Percentage of validation set.
    • init_coding_strategy : Initial coding strategy.
    • ecocone_mode : ECOC One mode 'PAIRS' or 'ALL_CLASSES'.
    • max_iter : Maximum number of iterations.
    • epsilon : ECOC ONE epsilon.
    • wvalidation : Weight for validation set.
  • Output Arguments:
    • mean_rows : Mean rows of fold coding matrices.
    • mean_cols : Mean columns of fold coding matrices.
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double cross_validation ( const mat &  samples,
const icolvec &  labels,
const imat &  codmat,
const Threshold thres,
const u32  n_folds,
const u32  n_classes,
const u32  criterion_option,
const u32  classifier_option,
const int  coding_strategy,
const int  decoding_strategy,
const u32  n_matrices,
const u32  n_desired_classifers,
const double  validation,
const int  init_coding_strategy,
const int  ecocone_mode,
const u32  max_iter,
const double  epsilon,
const double  wvalidation,
const bool  verbose,
double &  mean_rows,
double &  mean_cols,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure.
  • Modified LIBSVM code.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Sample labels.
    • codmat : Custom coding matrix.
    • thres : Threshold object.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • criterion_option : Entered criterion option by user.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • n_matrices : Number of random matrices to select from.
    • n_desired_classifiers : Number of columns in the coding matrix.
    • validation : Percentage of validation set.
    • init_coding_strategy : Initial coding strategy.
    • ecocone_mode : ECOC One mode 'PAIRS' or 'ALL_CLASSES'.
    • max_iter : Maximum number of iterations.
    • epsilon : ECOC ONE epsilon.
    • wvalidation : Weight for validation set.
  • Output Arguments:
    • mean_rows : Mean rows of fold coding matrices.
    • mean_cols : Mean columns of fold coding matrices.
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvcustom ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const imat &  codmat,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for Custom coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • codmat : Custom coding matrix.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvdecoc ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  criterion_option,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for DECOC coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • criterion_option : Criterion option for SFFS.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvdenserand ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  n_matrices,
const u32  n_desired_classifers,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for Dense Random coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • n_matrices : Number of random matrices to select from.
    • n_desired_classifiers : Number of columns in the coding matrix.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvecocone ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const double  validation,
const int  init_coding_strategy,
const int  ecocone_mode,
const u32  max_iter,
const double  epsilon,
const double  wvalidation,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for ECOC one coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • validation : Percentage of validation set.
    • init_coding_strategy : Initial coding strategy.
    • ecocone_mode : ECOC One mode 'PAIRS' or 'ALL_CLASSES'.
    • max_iter : Maximum number of iterations.
    • epsilon : ECOC ONE epsilon.
    • wvalidation : Weight for validation set.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvforest ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  n_trees,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for Forest ECOC coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • n_trees : Number of created trees.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvonesvsall ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for one vs all coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvonesvsone ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for one vs one coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvsparserand ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  n_matrices,
const u32  n_desired_classifers,
const bool  verbose,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for Sparse Random coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • n_matrices : Number of random matrices to select from.
    • n_desired_classifiers : Number of columns in the coding matrix.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double ecocpak::cvsubdecoc ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  criterion_option,
const Threshold thres,
const bool  verbose,
double &  mr,
double &  mc,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for SUBDECOC coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • criterion_option : Criterion option for SFFS.
    • thres : Thershold object.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • mr : Mean number of rows of coding matrices.
    • mc : Mean number of columns of coding matrices.
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
double cvsubdecoc ( const mat &  samples,
const icolvec &  labels,
const u32  n_folds,
const u32  n_classes,
const u32  classifier_option,
const int  decoding_strategy,
const u32  criterion_option,
const Threshold thres,
const bool  verbose,
double &  mr,
double &  mc,
double &  elapsed_time,
ofstream &  output 
)
  • Cross validation procedure for SUBDECOC coding. Actually an interface function.
  • Input Arguments:
    • samples : Samples matrix.
    • labels : Samples' labels.
    • n_folds : Number of folds.
    • n_classes : Number of classes.
    • classifiers_option : Type of classifier.
    • decoding_strategy : User's option specifying the type of decoding method that will be used.
    • criterion_option : Criterion option for SFFS.
    • thres : Thershold object.
    • verbose : Verbose mode, true if on otherwise false.
  • Output Arguments:
    • mr : Mean number of rows of coding matrices.
    • mc : Mean number of columns of coding matrices.
    • elapsed_time : Elapsed time.
    • output : Output stream in case of verbose mode true.
  • Return Argument:
    • Scalar which represents mean error in [0,1].
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerator Defines