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) 2011 Sergey Lisitsyn 00008 * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society 00009 */ 00010 00011 #ifndef EVALUATION_H_ 00012 #define EVALUATION_H_ 00013 00014 #include <shogun/labels/Labels.h> 00015 #include <shogun/base/SGObject.h> 00016 00017 namespace shogun 00018 { 00019 00020 class CLabels; 00021 00024 enum EEvaluationDirection 00025 { 00026 ED_MINIMIZE, ED_MAXIMIZE 00027 }; 00028 00036 class CEvaluation: public CSGObject 00037 { 00038 public: 00040 CEvaluation() : CSGObject() {}; 00041 00043 virtual ~CEvaluation() {}; 00044 00050 virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth) = 0; 00051 00057 virtual void set_indices(SGVector<index_t> indices) 00058 { 00059 } 00060 00062 virtual EEvaluationDirection get_evaluation_direction()=0; 00063 }; 00064 00065 } 00066 00067 #endif /* EVALUATION_H_ */