ECOCPAK v0.9
|
00001 // Copyright (C) 2011 the authors listed below 00002 // http://ecocpak.sourceforge.net 00003 // 00004 // Authors: 00005 // - Dimitrios Bouzas (bouzas at ieee dot org) 00006 // - Nikolaos Arvanitopoulos (niarvani at ieee dot org) 00007 // - Anastasios Tefas (tefas at aiia dot csd dot auth dot gr) 00008 // 00009 // This file is part of the ECOC PAK C++ library. It is 00010 // provided without any warranty of fitness for any purpose. 00011 // 00012 // You can redistribute this file and/or modify it under 00013 // the terms of the GNU Lesser General Public License (LGPL) 00014 // as published by the Free Software Foundation, either 00015 // version 3 of the License or (at your option) any later 00016 // version. 00017 // (see http://www.opensource.org/licenses for more info) 00018 00019 00020 00021 // include LIBSVM 00022 #include "svm.h" 00023 #define Malloc(type, n) (type *)malloc( ( n ) * sizeof( type ) ) 00024 00025 void print_null(const char *s) {} 00026 00027 struct svm_parameter param; // set by parse_command_line 00028 00029 00030 00033 namespace ecocpak 00034 { 00035 00036 // coding strategies enumaration 00037 enum 00038 { 00039 ONE_VS_ONE, // One versus One Coding 00040 ONE_VS_ALL, // One versus All Coding 00041 DECOC, // Discriminant Error Correcting 00042 SUBDECOC, // DECOC with subclasses 00043 // Output Codes Coding 00044 DENSE_RANDOM, // Dense Random Coding 00045 SPARSE_RANDOM, // Sparse Random Coding 00046 ECOC_ONE, // ECOC One Coding 00047 FOREST_ECOC, // Forest ECOC 00048 CUSTOM_CODING // Custom Coding 00049 }; 00050 00051 // enumeration that holds the decoding strategies 00052 enum 00053 { 00054 HAMMING, // Hamming Decoding 00055 EUCLIDEAN, // Euclidean Decoding 00056 LAPLACIAN, // Laplacian Decoding 00057 HAMMING_ATTENUATED, // Hamming Attenuated Decoding 00058 EUCLIDEAN_ATTENUATED, // Euclidean Attenuated Decoding 00059 LINEAR_LOSS_WEIGHTED_DECODING, // Linear Loss Weighted Decoding 00060 EXPONENTIAL_LOSS_WEIGHTED_DECODING, // Exponential Loss Weighted 00061 // Decoding 00062 LINEAR_LOSS_BASED_DECODING, // Linear Loss Based Decoding 00063 EXPONENTIAL_LOSS_BASED_DECODING, // Exponential Loss Based 00064 // Decoding 00065 BETA_DENSITY_DECODING, // Beta-density Decoding 00066 PROBABILISTIC_BASED_DECODING, // Probabilistic Based Decoding 00067 INVERSE_HAMMING_DECODING, // Inverse Hamming Decoding 00068 CUSTOM_DECODING // Custom Decoding 00069 }; 00070 00071 // enumeration that holds the decomposition criteria for SubDECOC 00072 enum 00073 { 00074 FQMI, 00075 FLDR, 00076 CUSTOM_CRITERION 00077 }; 00078 00079 // ECOC ONE modes 00080 enum 00081 { 00082 PAIR, // Add only pair of classes 00083 ALL_CLASSES // Use SFFS 00084 }; 00085 00086 // include files 00087 #include "ClassData.hpp" 00088 #include "Classifier.hpp" 00089 #include "Threshold.hpp" 00090 #include "fn_aux.hpp" 00091 #include "fn_loss_weighted_decoding.hpp" 00092 #include "fn_custom_decoding.hpp" 00093 #include "fn_probabilistic_decoding.hpp" 00094 #include "fn_decode_codeword.hpp" 00095 #include "fn_decode.hpp" 00096 #include "fn_dense_to_sparse.hpp" 00097 #include "fn_sparse_to_dense.hpp" 00098 #include "fn_process_labels.hpp" 00099 #include "op_kmeans_proto.hpp" 00100 #include "op_kmeans_meat.hpp" 00101 #include "fn_kmeans.hpp" 00102 #include "Classifier_ncc.hpp" 00103 #include "Classifier_flda.hpp" 00104 #include "Classifier_svm.hpp" 00105 #include "Classifier_adaBoost.hpp" 00106 #include "Classifier_ls.hpp" 00107 #include "Classifier_custom.hpp" 00108 #include "fn_construct_classifier.hpp" 00109 #include "fn_fqmi.hpp" 00110 #include "fn_fldr.hpp" 00111 #include "fn_custom_criterion.hpp" 00112 #include "fn_sffs.hpp" 00113 #include "fn_subclass_encoding.hpp" 00114 #include "fn_one_vs_one.hpp" 00115 #include "fn_one_vs_all.hpp" 00116 #include "fn_decoc.hpp" 00117 #include "fn_subdecoc.hpp" 00118 #include "fn_dense_random_ecoc.hpp" 00119 #include "fn_sparse_random_ecoc.hpp" 00120 #include "fn_ecoc_one.hpp" 00121 #include "fn_forest_ecoc.hpp" 00122 #include "fn_custom_coding.hpp" 00123 #include "fn_group_classes.hpp" 00124 #include "fn_crossvalidation.hpp" 00125 #include "fn_uci_glass.hpp" 00126 #include "fn_uci_iris.hpp" 00127 #include "fn_load_dataset_from_file.hpp" 00128 };