SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LatentLabels.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 Viktor Gal
8  * Copyright (C) 2012 Viktor Gal
9  */
10 
11 #ifndef __LATENTLABELS_H__
12 #define __LATENTLABELS_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/labels/Labels.h>
17 #include <shogun/lib/Data.h>
19 
20 namespace shogun
21 {
26  class CLatentLabels : public CLabels
27  {
28  public:
30  CLatentLabels();
31 
36  CLatentLabels(int32_t num_samples);
37 
42  CLatentLabels(CLabels* labels);
43 
45  virtual ~CLatentLabels();
46 
52 
58  CData* get_latent_label(int32_t idx);
59 
64  void add_latent_label(CData* label);
65 
72  bool set_latent_label(int32_t idx, CData* label);
73 
80  virtual void ensure_valid(const char* context=NULL);
81 
86  virtual ELabelType get_label_type() const { return LT_LATENT; }
87 
92  virtual const char* get_name() const { return "LatentLabels"; }
93 
98  virtual int32_t get_num_labels() const;
99 
104  void set_labels(CLabels* labels);
105 
110  CLabels* get_labels() const;
111 
112  protected:
117 
118  private:
120  void init();
121  };
122 }
123 
124 #endif /* __LATENTLABELS_H__ */
125 

SHOGUN Machine Learning Toolbox - Documentation