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 * Copyright (C) 2012 Jacob Walker 00008 */ 00009 00010 #ifndef CGRADIENTCRITERION_H_ 00011 #define CGRADIENTCRITERION_H_ 00012 00013 #include <shogun/evaluation/Evaluation.h> 00014 00015 namespace shogun 00016 { 00017 00022 class CGradientCriterion: public CEvaluation 00023 { 00024 00025 00026 public: 00027 00028 /*Constructor*/ 00029 CGradientCriterion(); 00030 00032 virtual ~CGradientCriterion(); 00033 00039 virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth) 00040 { return 0; } 00041 00042 00044 virtual EEvaluationDirection get_evaluation_direction() 00045 { return m_direction; } 00046 00050 virtual void set_evaluation_direction(EEvaluationDirection dir) 00051 { 00052 m_direction = dir; 00053 } 00054 00056 virtual const char* get_name() const { return "GradientCriterion"; } 00057 00058 private: 00059 /*Evaluation Direction*/ 00060 EEvaluationDirection m_direction; 00061 00062 }; 00063 00064 } /* namespace shogun */ 00065 #endif /* CGRADIENTCRITERION_H_ */