SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GradientCriterion.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  * 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 public:
00026     CGradientCriterion() : CEvaluation() { m_direction=ED_MINIMIZE; }
00027 
00028     virtual ~CGradientCriterion() { }
00029 
00037     virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth)
00038     {
00039         return 0.0;
00040     }
00041 
00043     virtual EEvaluationDirection get_evaluation_direction() const
00044     {
00045         return m_direction;
00046     }
00047 
00052     virtual void set_evaluation_direction(EEvaluationDirection direction)
00053     {
00054         m_direction=direction;
00055     }
00056 
00061     virtual const char* get_name() const { return "GradientCriterion"; }
00062 
00063 private:
00065     EEvaluationDirection m_direction;
00066 };
00067 }
00068 #endif /* CGRADIENTCRITERION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation