SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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() const { return LT_LATENT; }
85 
90  virtual const char* get_name() const { return "LatentLabels"; }
91 
96  virtual int32_t get_num_labels() const;
97 
102  void set_labels(CLabels* labels);
103 
108  CLabels* get_labels() const;
109 
110  protected:
115 
116  private:
118  void init();
119  };
120 }
121 
122 #endif /* __LATENTLABELS_H__ */
123 
virtual void ensure_valid(const char *context=NULL)
virtual int32_t get_num_labels() const
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
virtual ELabelType get_label_type() const
Definition: LatentLabels.h:84
virtual const char * get_name() const
Definition: LatentLabels.h:90
latent latent labels
Definition: LabelTypes.h:22
CData * get_latent_label(int32_t idx)
CLabels * get_labels() const
dummy data holder
Definition: Data.h:23
void set_labels(CLabels *labels)
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
CDynamicObjectArray * get_latent_labels() const
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
void add_latent_label(CData *label)
abstract class for latent labels As latent labels always depends on the given application, this class only defines the API that the user has to implement for latent labels.
Definition: LatentLabels.h:24
CDynamicObjectArray * m_latent_labels
Definition: LatentLabels.h:112
ELabelType
Definition: LabelTypes.h:11
bool set_latent_label(int32_t idx, CData *label)

SHOGUN Machine Learning Toolbox - Documentation