SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LatentModel.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 __LATENTMODEL_H__
12 #define __LATENTMODEL_H__
13 
17 
18 namespace shogun
19 {
30  class CLatentModel: public CSGObject
31  {
32  public:
34  CLatentModel();
35 
42 
44  virtual ~CLatentModel();
45 
50  virtual int32_t get_num_vectors() const;
51 
56  virtual int32_t get_dim() const=0;
57 
62  void set_labels(CLatentLabels* labs);
63 
68  CLatentLabels* get_labels() const;
69 
74  void set_features(CLatentFeatures* feats);
75 
81 
90  virtual CData* infer_latent_variable(const SGVector<float64_t>& w, index_t idx)=0;
91 
97  virtual void argmax_h(const SGVector<float64_t>& w);
98 
103  virtual const char* get_name() const { return "LatentModel"; }
104 
105  protected:
110 
111  private:
113  void register_parameters();
114  };
115 }
116 
117 #endif /* __LATENTMODEL_H__ */
118 

SHOGUN Machine Learning Toolbox - Documentation