SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StructuredAccuracy.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2012 Fernando José Iglesias García
8  * Copyright (C) 2012 Fernando José Iglesias García
9  */
10 
11 #ifndef __STRUCTURED_ACCURACY_H__
12 #define __STRUCTURED_ACCURACY_H__
13 
14 #include <shogun/lib/config.h>
15 
18 
19 namespace shogun
20 {
21 
26 {
27  public:
30 
32  virtual ~CStructuredAccuracy();
33 
41  virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
42 
51  static SGMatrix<int32_t> get_confusion_matrix(CLabels* predicted, CLabels* ground_truth);
52 
58  {
59  return ED_MAXIMIZE;
60  }
61 
63  virtual const char* get_name() const { return "StructuredAccuracy"; }
64 
65  private:
73  float64_t evaluate_real(CStructuredLabels* predicted, CStructuredLabels* ground_truth);
74 
82  float64_t evaluate_sequence(CStructuredLabels* predicted, CStructuredLabels* ground_truth);
83 
84 }; /* class CStructuredAccuracy*/
85 
86 } /* namespace shogun */
87 
88 #endif /* __STRUCTURED_ACCURACY_H__ */

SHOGUN Machine Learning Toolbox - Documentation