SHOGUN  5.0.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/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 
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:43
virtual ELabelType get_label_type() const
Definition: LatentLabels.h:86
virtual const char * get_name() const
Definition: LatentLabels.h:92
latent latent labels
Definition: LabelTypes.h:26
CData * get_latent_label(int32_t idx)
CLabels * get_labels() const
dummy data holder
Definition: Data.h:25
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:18
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:26
CDynamicObjectArray * m_latent_labels
Definition: LatentLabels.h:114
ELabelType
Definition: LabelTypes.h:15
bool set_latent_label(int32_t idx, CData *label)

SHOGUN Machine Learning Toolbox - Documentation