SHOGUN  v2.0.0
 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/labels/Labels.h>
15 #include <shogun/lib/Data.h>
17 
18 namespace shogun
19 {
24  class CLatentLabels : public CLabels
25  {
26  public:
28  CLatentLabels();
29 
34  CLatentLabels(int32_t num_samples);
35 
40  CLatentLabels(CLabels* labels);
41 
43  virtual ~CLatentLabels();
44 
50 
56  CData* get_latent_label(int32_t idx);
57 
62  void add_latent_label(CData* label);
63 
70  bool set_latent_label(int32_t idx, CData* label);
71 
78  virtual void ensure_valid(const char* context=NULL);
79 
84  virtual ELabelType get_label_type() { return LT_LATENT; }
85 
90  static CLatentLabels* obtain_from_generic(CLabels* base_labels);
91 
96  virtual const char* get_name() const { return "LatentLabels"; }
97 
102  virtual int32_t get_num_labels();
103 
108  void set_labels(CLabels* labels);
109 
114  CLabels* get_labels() const;
115 
116  protected:
121 
122  private:
124  void init();
125  };
126 }
127 
128 #endif /* __LATENTLABELS_H__ */
129 

SHOGUN Machine Learning Toolbox - Documentation