SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GUILabels.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) 1999-2008 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
10  */
11 
12 #ifndef __GUILABELS__H_
13 #define __GUILABELS__H_
14 
15 #include <shogun/lib/config.h>
16 #include <shogun/base/SGObject.h>
17 #include <shogun/labels/Labels.h>
18 
19 namespace shogun
20 {
21 class CSGInterface;
22 
24 class CGUILabels : public CSGObject
25 {
26  public:
28  CGUILabels() {};
32  CGUILabels(CSGInterface* interface);
34  ~CGUILabels();
35 
40 
44  bool set_train_labels(CLabels* lab) { SG_REF(lab); SG_UNREF(train_labels); train_labels=lab; return true;}
48  bool set_test_labels(CLabels* lab) { SG_REF(lab); SG_UNREF(test_labels); test_labels=lab; return true;}
49 
54  bool load(char* filename, char* target);
58  bool save(char* param);
59 
66  CLabels* infer_labels(float64_t* lab, int32_t len);
67 
69  virtual const char* get_name() const { return "GUILabels"; }
70 
71  protected:
73  CSGInterface* ui;
78 };
79 }
80 #endif
CLabels * get_train_labels()
Definition: GUILabels.h:37
CLabels * infer_labels(float64_t *lab, int32_t len)
Definition: GUILabels.cpp:81
UI labels.
Definition: GUILabels.h:24
CSGInterface * interface
Definition: SGInterface.cpp:45
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
bool save(char *param)
Definition: GUILabels.cpp:75
CLabels * get_test_labels()
Definition: GUILabels.h:39
#define SG_REF(x)
Definition: SGObject.h:54
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:115
virtual const char * get_name() const
Definition: GUILabels.h:69
double float64_t
Definition: common.h:50
#define SG_UNREF(x)
Definition: SGObject.h:55
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
CSGInterface * ui
Definition: GUILabels.h:73
bool set_test_labels(CLabels *lab)
Definition: GUILabels.h:48
bool load(char *filename, char *target)
Definition: GUILabels.cpp:37
CLabels * test_labels
Definition: GUILabels.h:77
bool set_train_labels(CLabels *lab)
Definition: GUILabels.h:44
CLabels * train_labels
Definition: GUILabels.h:75

SHOGUN Machine Learning Toolbox - Documentation