ECOCSimpleDecoder.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2012 Chiyuan Zhang
00008  * Copyright (C) 2012 Chiyuan Zhang
00009  */
00010 
00011 #ifndef ECOCSIMPLEDECODER_H__
00012 #define ECOCSIMPLEDECODER_H__
00013 
00014 #include <shogun/multiclass/ecoc/ECOCDecoder.h>
00015 #include <shogun/mathematics/Math.h>
00016 
00017 namespace shogun
00018 {
00019 
00024 class CECOCSimpleDecoder: public CECOCDecoder
00025 {
00026 public:
00028     CECOCSimpleDecoder() {}
00029 
00031     virtual ~CECOCSimpleDecoder() {}
00032 
00034     virtual const char* get_name() const { return "ECOCSimpleDecoder"; }
00035 
00040     virtual int32_t decide_label(const SGVector<float64_t> outputs, const SGMatrix<int32_t> codebook);
00041 
00042 protected:
00044     virtual bool binary_decoding()=0;
00045 
00047     virtual float64_t compute_distance(SGVector<float64_t> outputs, const int32_t *code)=0;
00048 };
00049 
00050 } /* shogun */ 
00051 
00052 #endif /* end of include guard: ECOCSIMPLEDECODER_H__ */
00053 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation