MeanAbsoluteError.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) 2011 Soeren Sonnenburg, Sergey Lisitsyn
00008  */
00009 
00010 #ifndef MEANABSOLUTEERROR_H_
00011 #define MEANABSOLUTEERROR_H_
00012 
00013 #include <shogun/evaluation/Evaluation.h>
00014 #include <shogun/labels/Labels.h>
00015 
00016 namespace shogun
00017 {
00018 
00019 class CLabels;
00020 
00032 class CMeanAbsoluteError: public CEvaluation
00033 {
00034 public:
00036     CMeanAbsoluteError() : CEvaluation() {};
00037 
00039     virtual ~CMeanAbsoluteError() {};
00040 
00046     virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
00047 
00048     inline EEvaluationDirection get_evaluation_direction()
00049     {
00050         return ED_MINIMIZE;
00051     }
00052 
00054     virtual const char* get_name() const { return "MeanAbsoluteError"; }
00055 };
00056 
00057 }
00058 
00059 #endif /* MEANABSOLUTEERROR_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation